-
-
Notifications
You must be signed in to change notification settings - Fork 107
73 lines (66 loc) · 1.67 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
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@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
with:
elixir-version: '1.13.4'
otp-version: '25.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.13'
otp:
- '24.0'
- '25.0'
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@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