-
Notifications
You must be signed in to change notification settings - Fork 1
49 lines (44 loc) · 1.31 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Continuous Integration
on: push
jobs:
validate-and-test:
runs-on: ubuntu-latest
name: Validate and test with OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }}
strategy:
matrix:
otp: ["22.3.4.24", "23.3.4.11", "24.2.1"]
elixir: ["1.11.4", "1.12.3", "1.13.3"]
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Restore cache
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-mix
- name: Install dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
- name: Compile
run: mix compile --warnings-as-errors
- name: Check formatting
run: mix format --check-formatted
- name: Run tests
run: mix test --trace --slowest 10
env:
MIX_ENV: test