-
Notifications
You must be signed in to change notification settings - Fork 57
81 lines (75 loc) · 1.83 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
---
name: Continuous Integration
on:
pull_request:
types:
- opened
- reopened
- synchronize
push:
branches:
- master
jobs:
Test:
strategy:
matrix:
elixir: ['1.15', '1.16']
otp: ['26', '27']
env:
MIX_ENV: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
version-type: 'strict'
- run: mix deps.get
- run: mix test
Format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: '26.2'
elixir-version: '1.16'
version-type: 'strict'
- run: mix deps.get
- run: mix format --check-formatted
Credo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: '26.2'
elixir-version: '1.16'
version-type: 'strict'
- run: mix deps.get
- run: mix credo
Dialyzer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: set cache key
id: cache_key
run: |
mix_hash="${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}"
echo "::set-output name=mix_hash::$mix_hash"
- uses: actions/cache@v2
with:
path: |
_build/dev/*.plt
_build/dev/*.plt.hash
key: plt-cache-${{ steps.cache_key.outputs.mix_hash }}
restore-keys: |
plt-cache-
- uses: erlef/setup-beam@v1
with:
otp-version: '26.2'
elixir-version: '1.16'
version-type: 'strict'
- run: mix deps.get
- run: mix dialyzer