-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (92 loc) · 3.2 KB
/
test.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
name: Lint (OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}})
strategy:
matrix:
otp: ["27"]
elixir: ["1.17"]
steps:
- uses: actions/checkout@v4
- name: BEAM setup
id: beam
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Build cache
uses: actions/cache@v4
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-build
restore-keys: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-build
path: |
_build
- name: PLT cache
uses: actions/cache@v4
id: plt_cache
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
restore-keys: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
path: |
priv/plts
- run: mix deps.get
- run: mix deps.unlock --check-unused
- run: mix compile --warnings-as-errors
- run: mix format --check-formatted
- run: mix credo --strict --all
- run: mix dialyzer
test:
runs-on: ubuntu-latest
name: Test (OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}})
strategy:
matrix:
elixir: ["1.17", "1.16", "1.15", "1.14", "1.13"]
otp: ["27", "26", "25", "24", "23"]
exclude:
- { otp: "24", elixir: "1.17" }
- { otp: "23", elixir: "1.17" }
- { otp: "22", elixir: "1.17" }
- { otp: "27", elixir: "1.16" }
- { otp: "23", elixir: "1.16" }
- { otp: "22", elixir: "1.16" }
- { otp: "27", elixir: "1.15" }
- { otp: "23", elixir: "1.15" }
- { otp: "27", elixir: "1.14" }
- { otp: "26", elixir: "1.14" }
- { otp: "22", elixir: "1.14" }
- { otp: "27", elixir: "1.13" }
- { otp: "26", elixir: "1.13" }
- { otp: "25", elixir: "1.13" }
steps:
- uses: actions/checkout@v4
- name: BEAM setup
id: beam
uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Mix cache
uses: actions/cache@v4
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-mix
restore-keys: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-mix
path: |
~/.mix
- name: Build cache
uses: actions/cache@v4
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-build
restore-keys: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-build
path: |
_build
- run: mix deps.get
- run: mix test