-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (52 loc) · 1.79 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
name: CI
on: push
# Set the GITHUB_TOKEN to a restricted permission we don't need anything else than this.
# This will disable all other permissions than metadata: read, which is always enabled.
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
name: OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }}
strategy:
matrix:
otp: ["25.3.2.8", "26.2.1"]
elixir: ["1.14.5", "1.15.7", "1.16.1"]
include:
- otp: "25.3.2.8"
elixir: "1.13.4"
env:
MIX_ENV: test
cache_version: v2
steps:
- uses: actions/checkout@v2
name: Checkout
- uses: actions/cache@v1
name: Cache deps
with:
path: deps
key: deps--${{ env.cache_version }}${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
restore-keys: |
deps-${{ env.cache_version }}-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- uses: actions/cache@v1
name: Cache _build
with:
path: _build
key: build-erlef-${{ env.cache_version }}-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}-${{ hashFiles('mix.lock') }}
restore-keys: |
build-erlef-${{ env.cache_version }}-${{ runner.os }}-${{ matrix.otp }}-${{ matrix.elixir }}
- uses: erlef/setup-elixir@v1
name: Setup elixir
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- run: mix deps.get
- name: Check that no unused deps exist
run: |
mix deps.clean --unused --unlock
git diff --exit-code
- run: mix compile
- run: mix test --trace --include skip
- run: mix credo
- run: mix dialyzer
- run: mix format --check-formatted