Skip to content

Commit 830f445

Browse files
authored
GitHub workflow CI (#133)
1 parent 4351fa8 commit 830f445

File tree

1 file changed

+70
-0
lines changed

1 file changed

+70
-0
lines changed

.github/workflows/ci.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
- ci-test-ghwf
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-22.04
13+
env:
14+
MIX_ENV: test
15+
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
include:
20+
- pair:
21+
elixir: 1.14.2
22+
otp: 25.0
23+
lint: lint
24+
25+
steps:
26+
- uses: actions/checkout@v2
27+
28+
- uses: erlef/setup-beam@v1
29+
with:
30+
otp-version: ${{ matrix.pair.otp }}
31+
elixir-version: ${{ matrix.pair.elixir }}
32+
33+
- name: Install dependencies
34+
run: mix do deps.get --only $MIX_ENV, deps.compile
35+
36+
- name: Check that there are no unused dependencies in mix.lock
37+
run: mix deps.get && mix deps.unlock --check-unused
38+
if: ${{ matrix.lint }}
39+
40+
- name: Compile with --warnings-as-errors
41+
run: mix compile --warnings-as-errors
42+
if: ${{ matrix.lint }}
43+
44+
- name: Run tests
45+
run: mix test
46+
47+
test_older_elixir:
48+
runs-on: ubuntu-20.04
49+
env:
50+
MIX_ENV: test
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
include:
55+
- pair:
56+
elixir: 1.8.1
57+
otp: 20.0
58+
steps:
59+
- uses: actions/checkout@v2
60+
61+
- uses: erlef/setup-beam@v1
62+
with:
63+
otp-version: ${{ matrix.pair.otp }}
64+
elixir-version: ${{ matrix.pair.elixir }}
65+
66+
- name: Install dependencies
67+
run: mix do deps.get --only $MIX_ENV, deps.compile
68+
69+
- name: Run tests
70+
run: mix test

0 commit comments

Comments
 (0)