Skip to content

Commit

Permalink
Add Github CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
crertel committed Aug 3, 2024
1 parent e78890f commit 226594e
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# cribbed from Scenic
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
env:
MIX_ENV: test

strategy:
fail-fast: false
matrix:
include:
- elixir: '1.15.0'
otp: '24.2'
- elixir: '1.16.0'
otp: '26.2'

steps:
- uses: actions/checkout@v3

- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}

- name: Cache build artifacts
uses: actions/cache@v3
with:
path: |
~/.hex
~/.mix
_build
priv/plts
key: ${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('**/mix.lock') }}
- name: Install Dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Compile Deps
run: mix deps.compile
- name: Compile
run: mix compile --warnings-as-errors
- name: Check formatting
run: mix format --check-formatted
if: startsWith(matrix.elixir, '1.15')
- name: Run Tests
run: mix test
# - name: Run credo
# run: mix credo suggest --min-priority=high --ignore-checks Credo.Check.Design.DuplicatedCode

0 comments on commit 226594e

Please sign in to comment.