-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.1 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
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
name: OTP ${{matrix.otp_vsn}}
strategy:
matrix:
otp_vsn: ['26.2', '25.3', '24.3']
rebar_vsn: ['3.22.0']
runs-on: 'ubuntu-22.04'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp_vsn }}
rebar3-version: ${{ matrix.rebar_vsn }}
- uses: actions/cache@v3
name: Cache
with:
path: _build
key: ${{ runner.os }}-build-${{ matrix.otp_vsn }}-${{ hashFiles(format('rebar.lock')) }}-1
restore-keys: ${{ runner.os }}-build-${{ matrix.otp_vsn }}-1-
- run: rebar3 as test compile
- run: rebar3 do xref, dialyzer
if: ${{ matrix.otp_vsn == '26.1' }}
- run: rebar3 do ct --cover
- run: rebar3 as test codecov analyze
- uses: codecov/codecov-action@v3
with:
name: Upload coverage reports to Codecov
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true