-
Notifications
You must be signed in to change notification settings - Fork 42
106 lines (103 loc) · 2.87 KB
/
tests.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
name: Tests
on:
push:
branches: master
pull_request:
branches: master
paths-ignore:
- 'docs/**'
schedule:
# Run at 00:00 UTC on the first day of each month
- cron: '00 00 1 * *'
env:
THREADS: 2
jobs:
basic:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- lint
- dialyzer
container: erlang:23
name: ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: '~/.cache'
key: ${{ runner.os }}-rebar-${{ matrix.target }}-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }}
restore-keys: |
${{ runner.os }}-rebar-${{ matrix.target }}-
${{ runner.os }}-rebar-
- run: make ${{ matrix.target }}
doc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
working-directory: doc
- uses: erlef/setup-beam@v1
with:
otp-version: '24'
rebar3-version: 3.23.0
- run: make -C doc test
tests-latest:
runs-on: ubuntu-latest
strategy:
matrix:
otp:
# Two latest minor versions of the most recent OTP release,
# if supported.
# When a new major OTP release is enabled, also update the badge in
# README.md and the argument given to generate_version_hrl in
# rebar.config
- '23'
target:
- 'tests-unit'
- 'tests-1'
- 'tests-2'
- 'tests-real'
container: erlang:${{ matrix.otp }}
name: OTP ${{ matrix.otp }} - ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- if: matrix.target != 'tests-unit'
run: .github/scripts/covertool_setup
- run: make ${{ matrix.target }}
env:
CONCUERROR: ${{ github.workspace }}/priv/concuerror
CONCUERROR_COVER: ${{ github.workspace}}/cover/data
- if: matrix.target == 'tests-unit'
run: |
rebar3 covertool generate
cp _build/test/covertool/concuerror.covertool.xml coverage.xml
- if: matrix.target != 'tests-unit'
run: |
.github/scripts/covertool_combine
cp cover/coverage.xml coverage.xml
- uses: codecov/codecov-action@v3
with:
file: coverage.xml
flags: ${{ matrix.target }}
tests-older:
runs-on: ubuntu-latest
strategy:
matrix:
# Last minor version of older OTP releases
otp:
- '22'
- '21'
- '20'
target:
- 'tests-1'
- 'tests-2'
- 'tests-real'
container: erlang:${{ matrix.otp }}
name: OTP ${{ matrix.otp }} - ${{ matrix.target }}
steps:
- uses: actions/checkout@v4
- run: make ${{ matrix.target }}