-
Notifications
You must be signed in to change notification settings - Fork 11
107 lines (81 loc) · 2.3 KB
/
test-action.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
97
98
99
100
101
102
103
104
105
106
107
on: push
name: Tests suite
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
unit-tests:
name: Unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Execute tests
run: docker compose -f docker-compose-test.yml run --rm ae_mdw
test-coverage:
name: Test coverage
runs-on: ubuntu-20.04
env:
MIX_ENV: test
NODEROOT: ./node/local
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Mdw Setup
uses: ./.github/actions/mdw-setup
- name: Node Setup
uses: ./.github/actions/node-setup
- name: Execute coverage
run: elixir --sname aeternity@localhost -S mix coveralls
lint:
name: Automated linting
runs-on: ubuntu-20.04
env:
NODEROOT: ./node/local
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Mdw Setup
uses: ./.github/actions/mdw-setup
- run: mix format --check-formatted && mix credo
lint-docs:
name: Swagger v2 auto-generation + linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: sed -i 's/[[:space:]]*$//' README.md
- run: git diff --exit-code README.md
dialyzer:
name: Dialyzer
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/cache@v3
with:
path: deps
key: dependencies-${{ hashFiles('mix.lock', '.github/actions/mdw-setup/action.yml') }}
- uses: actions/cache@v3
with:
path: _build
key: build-${{ hashFiles('mix.lock', '.github/actions/mdw-setup/action.yml') }}
- uses: actions/cache@v3
id: plt-cache
with:
path: priv/plts
key: plts-v14-${{ hashFiles('mix.lock', '.github/actions/mdw-setup/action.yml') }}
- name: Mdw Setup
uses: ./.github/actions/mdw-setup
- name: Create PLTs
if: steps.plt-cache.outputs.cache-hit != 'true'
run: |
mkdir -p priv/plts
mix dialyzer --plt --format github
- run: mix dialyzer --format github