-
Notifications
You must be signed in to change notification settings - Fork 104
99 lines (79 loc) · 2.28 KB
/
main.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
95
96
97
98
99
name: CI
on: [push, pull_request]
env:
MIX_ENV: test
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.15.4
otp: 26.0.2
lint: true
- elixir: 1.14.5
otp: 25.2
- elixir: 1.13.4
otp: 24.3.4.5
steps:
- uses: actions/checkout@v2
- name: Setup Beam
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Erlang Tests
run: |
make distclean
make erlang-mk
make ct
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Check Formatting
if: ${{ matrix.lint }}
run: mix format --check-formatted
- name: Elixir Tests
run: mix test
- name: Logs
uses: actions/upload-artifact@v2-preview
if: failure()
with:
name: ct-logs-${{matrix.erlang}}
path: logs/*
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Beam
id: setupBeam
uses: erlef/setup-beam@v1
with:
elixir-version: 1.15.4
otp-version: 26.0.2
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v1
id: mix-cache
with:
path: deps
key: ${{ runner.os }}-${{ steps.setupBEAM.outputs.otp-version }}-${{ steps.setupBEAM.outputs.otp-version }}-mix-${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
- name: Install Mix Dependencies
if: steps.mix-cache.outputs.cache-hit != 'true'
run: |
mix local.rebar --force
mix local.hex --force
mix deps.get
- name: Dialyzer
run: mix dialyzer --format github