forked from beam-community/jsonapi
-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (58 loc) · 1.79 KB
/
Copy pathci.yml
File metadata and controls
61 lines (58 loc) · 1.79 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
name: Continuous Integration
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- 'master'
jobs:
test:
env:
MIX_ENV: test
runs-on: ubuntu-latest
name: Test (OTP ${{ matrix.otp }} / Elixir ${{ matrix.elixir }})
strategy:
matrix:
elixir: ['1.13', '1.12', '1.11', '1.10']
# All of the above can use this version. For details see: https://hexdocs.pm/elixir/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
otp: [25, 24, 23, 22]
exclude:
- {otp: '24', elixir: '1.10'}
- {otp: '25', elixir: '1.10'}
- {otp: '25', elixir: '1.11'}
- {otp: '25', elixir: '1.12'}
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- run: mix deps.get
- run: mix test
lint:
runs-on: ubuntu-latest
name: Linting
strategy:
matrix:
elixir: ['1.13']
otp: [25]
steps:
- uses: actions/checkout@v2
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: PLT cache
uses: actions/cache@v2
with:
key: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
restore-keys: |
${{ runner.os }}-${{ steps.beam.outputs.elixir-version }}-${{ steps.beam.outputs.otp-version }}-plt
path: |
priv/plts
- run: mix deps.get
- run: mix compile --warnings-as-errors
- run: mix format --check-formatted
- run: mix credo --strict
- run: mix dialyzer --halt-exit-status