-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.34 KB
/
pr.yaml
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
name: PR checks
on:
pull_request:
branches: [ main ]
paths:
- 'lib/**'
- 'test/**'
- 'mix.lock'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
version:
- { elixir: '1.14.x', otp: '24.x' }
- { elixir: '1.14.x', otp: '25.x' }
- { elixir: '1.15.x', otp: '25.x' }
- { elixir: '1.15.x', otp: '26.x' }
env:
MIX_ENV: test
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: erlef/setup-beam@61e01a43a562a89bfc54c7f9a378ff67b03e4a21 # v1.16.0
with:
otp-version: ${{ matrix.version.otp }}
elixir-version: ${{ matrix.version.elixir }}
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: deps
key: ${{ runner.os }}-mix-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # v3.3.2
with:
path: _build
key: ${{ runner.os }}-build-${{ hashFiles('mix.lock') }}
restore-keys: |
${{ runner.os }}-build-
- run: mix deps.get
- run: mix deps.compile
- run: mix compile --warnings-as-errors
- run: mix credo
- run: mix test