-
Notifications
You must be signed in to change notification settings - Fork 1
121 lines (100 loc) · 3.48 KB
/
elixir.yaml
File metadata and controls
121 lines (100 loc) · 3.48 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: mix test
on: [push, pull_request]
jobs:
mix-format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: '24.0'
elixir-version: '1.12.2'
- name: Check formatting
run: mix format --check-formatted
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: '24.0'
elixir-version: '1.12.2'
- name: Retrieve cached mix deps
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
- name: Retrieve cached _build
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-
- name: Retrieve cached PLT
uses: actions/cache@v2
with:
path: .dialyzer
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-dialyzer-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('**/lib/*.ex') }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-dialyzer-${{ hashFiles('**/mix.lock') }}-${{ hashFiles('**/lib/*.ex') }}
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-dialyzer-${{ hashFiles('**/mix.lock') }}-
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-dialyzer-
- name: Install dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
- name: Run Dialyzer
run: mix dialyzer --format short 2>&1
test-elixir:
name: Test with OTP ${{ matrix.otp }} and Elixir ${{ matrix.elixir }}
runs-on: ubuntu-latest
env:
MIX_ENV: test
strategy:
fail-fast: false
matrix:
include:
- otp: '23.0'
elixir: '1.12.2'
- otp: '24.0'
elixir: '1.12.2'
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Retrieve cached mix deps
uses: actions/cache@v2
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-
- name: Retrieve cached _build
uses: actions/cache@v2
with:
path: _build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-${{ github.sha }}
restore-keys: |
${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-build-
- name: Install dependencies
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
mix deps.compile
- name: Compile project
run: mix compile
- name: Run tests
run: mix test