-
-
Notifications
You must be signed in to change notification settings - Fork 16
93 lines (90 loc) · 2.65 KB
/
Copy pathtest.yml
File metadata and controls
93 lines (90 loc) · 2.65 KB
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
name: Test
on:
pull_request:
branches:
- 'main'
push:
branches:
- 'main'
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: '23.2'
elixir-version: '1.11.3'
- uses: actions/cache@v2
name: Cache
with:
path: |
deps
key: v2-${{ hashFiles('mix.lock') }}
- run: mix deps.get
- run: mix format --check-formatted
tests:
runs-on: ${{ matrix.os }}
name: Test on Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }}
strategy:
matrix:
otp_version: ['21.3', '23.2']
elixir: ['1.9.4', '1.11.3']
os: [ubuntu-latest]
env:
OTP_VERSION: ${{ matrix.otp_version }}
ELIXIR_VERSION: ${{ matrix.elixir }}
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{ matrix.otp_version }}
elixir-version: ${{ matrix.elixir }}
- uses: actions/cache@v2
name: Cache
with:
path: |
deps
_build
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir }}-v2-${{ hashFiles(format('{0}{1}', github.workspace, 'mix.lock')) }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir }}-
- run: mix deps.get
name: Deps
- run: mix test --cover
name: ExUnit
- uses: codecov/codecov-action@v1
if: ${{ always() }}
with:
file: coverage.xml
env_vars: OTP_VERSION,ELIXIR_VERSION
dialyze:
runs-on: ${{ matrix.os }}
name: Dialyze on Elixir ${{ matrix.elixir }} (OTP ${{ matrix.otp_version }}) and ${{ matrix.os }}
strategy:
matrix:
otp_version: ['21.3', '23.2']
elixir: ['1.9.4', '1.11.3']
os: [ubuntu-latest]
env:
OTP_VERSION: ${{ matrix.otp_version }}
ELIXIR_VERSION: ${{ matrix.elixir }}
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-elixir@v1
with:
otp-version: ${{ matrix.otp_version }}
elixir-version: ${{ matrix.elixir }}
- uses: actions/cache@v2
name: Cache
with:
path: |
deps
_build
key: ${{ runner.os }}-dialyzer-${{ matrix.otp_version }}-${{ matrix.elixir }}-v2-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.elixir }}-
- run: mix deps.get
name: Deps
- run: mix dialyzer
name: Dialyzer