-
Notifications
You must be signed in to change notification settings - Fork 14
83 lines (67 loc) · 1.89 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: CI
on:
- push
- pull_request
jobs:
format:
name: Format and compile with warnings as errors
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install OTP and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "25.0"
elixir-version: "1.14.2"
- name: Install dependencies
run: mix deps.get
- name: Check mix format
run: mix format --check-formatted
- name: Compile with warnings as errors
run: mix compile --warnings-as-errors
analysis:
name: Run static code analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install OTP and Elixir
uses: erlef/setup-beam@v1
with:
otp-version: "25.0"
elixir-version: "1.14.2"
- name: Install dependencies
run: mix deps.get
- name: Analyze code
run: mix credo --strict
test:
name: Test Elixir ${{ matrix.elixir }}, OTP ${{ matrix.erlang }}
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
include:
- erlang: "24.2"
elixir: "1.12.3"
os: "ubuntu-22.04"
- erlang: "24.2"
elixir: "1.13.4"
os: "ubuntu-22.04"
- erlang: "23.0"
elixir: "1.11.2"
os: "ubuntu-20.04"
- erlang: "23.0"
elixir: "1.10.3"
os: "ubuntu-20.04"
steps:
- uses: actions/checkout@v1
- 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 --only test
- name: Run unit tests
run: mix test --trace --exclude functional
- name: Run functional tests
run: mix test --trace --only functional