-
-
Notifications
You must be signed in to change notification settings - Fork 105
96 lines (87 loc) · 2.27 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
name: PromEx CI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
static_analysis:
name: Static Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.17.2"
otp-version: "27.0"
- name: Restore cache
uses: actions/cache@v3
with:
path: |
deps
_build
priv/plts
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
restore-keys: |
${{ runner.os }}-mix-
- name: Install dependencies
run: mix deps.get
- name: Mix Formatter
run: mix format --check-formatted
- name: Check for compiler warnings
run: mix compile --warnings-as-errors
- name: Credo strict checks
run: mix credo --strict
- name: Doctor documentation checks
run: mix doctor
- name: Dialyzer checks
run: mix dialyzer
unit_test:
name: Run ExUnit tests
runs-on: ubuntu-latest
strategy:
matrix:
elixir:
- "1.17"
otp:
- "26.0"
- "27.0"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: ${{ matrix.elixir }}
otp-version: ${{ matrix.otp }}
- name: Install dependencies
run: mix deps.get
- name: ExUnit tests
env:
MIX_ENV: test
run: mix coveralls.github --exclude mix_task:true
mix_task_tests:
name: Mix task tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Elixir
uses: erlef/setup-beam@v1
with:
elixir-version: "1.17.2"
otp-version: "27.0"
- name: Install dependencies
run: mix deps.get
- name: Generate config test
env:
MIX_ENV: test
run: mix test --only mix_task_gen_config:true
- name: Export dashboard test
env:
MIX_ENV: test
run: mix test --only mix_task_dashboard_export:true