-
Notifications
You must be signed in to change notification settings - Fork 8
61 lines (53 loc) · 1.29 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
name: "CI"
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-20.04
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: "[${{matrix.otp}}/${{matrix.elixir}}] CI Tests"
strategy:
matrix:
otp: [22, 23, 24, 25]
elixir: ["1.13.4", "1.14.0"]
exclude:
- otp: 22
elixir: "1.14.0"
steps:
- uses: actions/checkout@v2.4.0
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: mix-cache
uses: actions/cache@v2
id: mix-cache
with:
path: |
deps
_build
key: ${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
- name: mix local
run: |
mix local.rebar --force
mix local.hex --force
- name: mix compile
run: |
mix deps.get
mix deps.compile
mix compile
if: steps.mix-cache.outputs.cache-hit != 'true'
- name: mix checks
run: |
mix deps.unlock --check-unused
mix format --check-formatted
- name: mix test
run: mix test