-
Notifications
You must be signed in to change notification settings - Fork 87
58 lines (48 loc) · 1.33 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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
test:
name: Test (Elixir ${{ matrix.elixir }} | Erlang/OTP ${{ matrix.erlang }})
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- erlang: "26.0"
elixir: "1.15"
lint: true
coverage: true
- erlang: "24.1"
elixir: "1.13"
- erlang: "22.2"
elixir: "1.11"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Install OTP and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.erlang }}
elixir-version: ${{ matrix.elixir }}
- name: Install dependencies
run: mix deps.get
- name: Check no unused dependencies
run: mix deps.unlock --check-unused
if: ${{ matrix.lint }}
- name: Check formatting
run: mix format --check-formatted
if: ${{ matrix.lint }}
- name: Compile with --warnings-as-errors
run: mix compile --warnings-as-errors
if: ${{ matrix.lint }}
- name: Run tests
run: mix test --trace
if: ${{ !matrix.coverage }}
- name: Run tests with code coverage
run: mix coveralls.github
if: ${{ matrix.coverage }}