-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (40 loc) · 1.22 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
name: CI
on: [push, pull_request]
jobs:
build:
strategy:
matrix:
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html
# https://github.com/erlef/setup-beam#compatibility-between-operating-system-and-erlangotp
elixir: ["1.13", "1.12"]
otp: ["24", "23", "22"]
os: ["ubuntu-20.04"]
include:
- { elixir: "1.13", otp: "24", os: "ubuntu-20.04", lint: "lint" }
runs-on: ${{ matrix.os }}
env:
MIX_ENV: test
steps:
- uses: actions/checkout@v3
- uses: erlef/[email protected]
with:
otp-version: ${{ matrix.otp }}
elixir-version: ${{ matrix.elixir }}
- name: Install dependencies
run: mix deps.get
- name: Check code formatting
run: mix format --check-formatted
if: ${{ matrix.lint }}
- name: Check unused dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- name: Compile dependencies
run: mix deps.compile
- name: Compile checking warnings
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- name: Compile
run: mix compile --warnings-as-errors
if: ${{ !matrix.lint }}
- name: Test
run: mix test