-
Notifications
You must be signed in to change notification settings - Fork 120
107 lines (87 loc) · 2.65 KB
/
Copy pathmain.yml
File metadata and controls
107 lines (87 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: CI
on: [push, pull_request]
env:
MIX_ENV: test
# libsodium's autogen.sh re-downloads config.guess/config.sub from GNU
# Savannah (curl without -f, so an outage saves an HTML error page as the
# script). autoreconf already installs working copies from automake.
DO_NOT_UPDATE_CONFIG_SCRIPTS: "1"
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- elixir: 1.20.2
otp: 29.0.3
rebar3: 3.27.0
lint: true
- elixir: 1.20.2
otp: 28.5.0.3
rebar3: 3.27.0
- elixir: 1.20.2
otp: 27.3.4.14
rebar3: 3.27.0
steps:
- uses: actions/checkout@v4
- name: Setup Beam
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
rebar3-version: ${{ matrix.rebar3 }}
- name: Erlang Tests
run: |
make distclean
make erlang-mk
make ct
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v4
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@v4
if: failure()
with:
name: ct-logs-${{matrix.otp}}
path: logs/*
dialyzer:
name: Dialyzer
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Beam
id: setupBeam
uses: erlef/setup-beam@v1
with:
elixir-version: 1.20.2
otp-version: 29.0.3
- name: Retrieve Mix Dependencies Cache
uses: actions/cache@v4
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