-
Notifications
You must be signed in to change notification settings - Fork 91
63 lines (51 loc) · 1.49 KB
/
main.yml
File metadata and controls
63 lines (51 loc) · 1.49 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
62
63
name: CI
on:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
test:
name: Test (Elixir ${{ matrix.elixir }} | Erlang/OTP ${{ matrix.erlang }})
runs-on: "${{ matrix.os }}"
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
erlang: "27.2"
elixir: "1.18"
lint: true
coverage: true
- os: ubuntu-22.04
erlang: "24.2"
elixir: "1.14"
env:
MIX_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install OTP and Elixir
uses: erlef/setup-beam@fc68ffb90438ef2936bbb3251622353b3dcb2f93 # v1.24.0
with:
otp-version: ${{ matrix.erlang }}
elixir-version: ${{ matrix.elixir }}
- name: Install dependencies
run: mix deps.get --check-locked
- 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
if: ${{ !matrix.coverage }}
- name: Run tests with code coverage
run: mix coveralls.github
if: ${{ matrix.coverage }}