-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (45 loc) · 1.28 KB
/
ci_workflow.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
name: CI / Automated testing
on:
push:
branches: ["**"]
jobs:
test:
runs-on: ubuntu-latest
name: Elixir ${{ matrix.elixir }} OTP ${{ matrix.otp }}
env:
MIX_ENV: test
strategy:
matrix:
elixir: [1.12.x, 1.13.x, 1.14.x]
otp: [24.x, 25.x]
exclude:
- elixir: 1.12.x
otp: 25.x
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Cache deps
uses: actions/cache@v2
with:
path: |
deps
_build
key: deps-cache-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('**/mix.lock') }}
restore-keys: |
deps-cache-${{ matrix.elixir }}-${{ matrix.otp }}-
- name: Install dependencies
run: mix do local.hex --force, local.rebar --force, deps.get
- name: Check code formatting
run: mix format --check-formatted
- name: Compile dependencies
run: mix deps.compile
- name: Compile code (warnings as errors)
run: mix compile --warnings-as-errors
- name: Run tests
run: mix test
- name: Create docs
run: mix docs