-
Notifications
You must be signed in to change notification settings - Fork 15
62 lines (62 loc) · 1.78 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
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-20.04
name: OTP ${{matrix.otp}} / Elixir ${{matrix.elixir}}
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.6
otp: 20.3
- elixir: 1.8.2
otp: 21.3
- elixir: 1.9.4
otp: 22.2
- elixir: 1.10.4
otp: 23.0
- elixir: 1.13.0
otp: 24.1
- elixir: 1.14.0
otp: 25.0
- elixir: 1.16.0
otp: 26.0
check_warnings: true
check_format: true
dialyzer: true
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: mix deps.get
- run: mix format --check-formatted
if: ${{ matrix.check_format }}
- run: mix compile --force --warnings-as-errors
if: ${{ matrix.check_warnings }}
- run: mix test --trace
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Restore PLT cache
uses: actions/cache@v2
if: ${{ matrix.dialyzer }}
id: plt_cache
with:
key: |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-plt
restore-keys: |
${{ runner.os }}-${{ matrix.elixir }}-${{ matrix.otp }}-plt
path: |
priv/plts
# Create PLTs if no cache was found
- name: Create PLTs
if: ${{ matrix.dialyzer && steps.plt_cache.outputs.cache-hit != 'true' }}
run: mix dialyzer --plt
- name: Run dialyzer
if: ${{ matrix.dialyzer }}
run: mix dialyzer