-
Notifications
You must be signed in to change notification settings - Fork 16
84 lines (80 loc) · 2.33 KB
/
ct.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
name: Erlang
on:
pull_request:
branches:
- 'main'
push:
branches:
- 'main'
jobs:
build:
name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
otp_version: ['25']
rebar3_version: ['3.23']
os: [ubuntu-22.04]
env:
OTP_VERSION: ${{ matrix.otp_version }}
steps:
- uses: actions/checkout@v4
- name: Set up postgres
run: docker compose up -d
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
rebar3-version: ${{ matrix.rebar3_version }}
- uses: actions/cache@v4
name: Cache
with:
path: |
_build
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-3
restore-keys: |
${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-3
- name: Compile
run: rebar3 compile
- name: Common Test tests
run: rebar3 ct --cover
- name: Publish Test Report
uses: mikepenz/action-junit-report@v2
if: always() # always run even if the previous step fails
with:
report_paths: '_build/test/logs/*/junit_report.xml'
- name: XRef
run: rebar3 xref
- name: Covertool
if: ${{ always() }}
run: rebar3 covertool generate
- uses: codecov/codecov-action@v2
if: ${{ always() }}
with:
file: _build/test/covertool/pgo.covertool.xml
env_vars: OTP_VERSION
dialyzer:
name: Dialyze on OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
otp_version: ['27']
rebar3_version: ['3.23']
os: [ubuntu-22.04]
steps:
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_version }}
rebar3-version: ${{ matrix.rebar3_version }}
- uses: actions/cache@v4
name: Cache
with:
path: |
_build
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-3
restore-keys: |
${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-3
- name: Compile
run: rebar3 compile
- name: Dialyzer
run: rebar3 dialyzer