-
Notifications
You must be signed in to change notification settings - Fork 428
183 lines (173 loc) · 5.43 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
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: CI
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# required for run_common_test.erl
KEEP_COVER_RUNNING: '1'
SKIP_AUTO_COMPILE: 'true'
# required for tools/gh-upload-to-s3.sh script
AWS_DEFAULT_REGION: "${{ secrets.AWS_DEFAULT_REGION }}"
AWS_ACCESS_KEY_ID: "${{ secrets.AWS_ACCESS_KEY_ID }}"
AWS_SECRET_ACCESS_KEY: "${{ secrets.AWS_SECRET_ACCESS_KEY }}"
# required for tools/gh-report-failing-testcases-to-ga4.sh script
GA4_API_SECRET: "${{ secrets.GA4_API_SECRET }}"
GA4_MEASUREMENT_API: "${{ secrets.GA4_MEASUREMENT_API }}"
jobs:
small_tests:
name: small_tests on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
otp: [ '24.3.4', '25.2' ]
runs-on: ubuntu-22.04
env:
PRESET: 'small_tests'
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.otp }}
- uses: actions/cache@v3
with:
path: ~/.cache/rebar3
key: rebar3-${{ hashFiles('rebar.lock') }}
- name: create certificates
run: make certs
- name: run test
run: tools/test.sh -p $PRESET -s true -e true
- name: prepare coverage report
run: ./rebar3 codecov analyze --lcov --json false
- name: report coverage
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: small_tests on OTP ${{matrix.otp}}
path-to-lcov: ./lcov.info
parallel: true
- name: upload common test results on failure
if: ${{ failure() }}
run: tools/gh-upload-to-s3.sh _build/test/logs test_logs
big_tests:
name: ${{matrix.preset}} on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
preset: [internal_mnesia, pgsql_mnesia, mysql_redis, odbc_mssql_mnesia,
ldap_mnesia, elasticsearch_and_cassandra_mnesia]
otp: [ '25.2' ]
include:
- test-spec: "default.spec"
- preset: elasticsearch_and_cassandra_mnesia
test-spec: "mam.spec"
- preset: ldap_mnesia
test-spec: "default.spec"
otp: '24.3.4'
- preset: pgsql_mnesia
test-spec: "default.spec"
otp: '24.3.4'
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/big-tests
with:
otp: ${{matrix.otp}}
preset: ${{matrix.preset}}
gh-token: ${{secrets.GITHUB_TOKEN}}
test-spec: ${{matrix.test-spec}}
- name: upload common test results on failure
if: ${{ failure() }}
run: tools/gh-upload-to-s3.sh big_tests/ct_report
- name: upload big_tests results to GA4
if: ${{ !cancelled() && github.ref_name == 'master' }}
run: tools/gh-report-failing-testcases-to-ga4.sh
dynamic_domains_big_tests:
name: dynamic domains ${{matrix.preset}} on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
preset: [pgsql_mnesia, mysql_redis, odbc_mssql_mnesia]
otp: [ '25.2' ]
test-spec: ["dynamic_domains.spec"]
include:
- preset: pgsql_mnesia
otp: '24.3.4'
test-spec: "dynamic_domains.spec"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/big-tests
with:
otp: ${{matrix.otp}}
preset: ${{matrix.preset}}
gh-token: ${{secrets.GITHUB_TOKEN}}
test-spec: ${{matrix.test-spec}}
- name: upload common test results on failure
if: ${{ failure() }}
run: tools/gh-upload-to-s3.sh big_tests/ct_report
- name: upload big_tests results to GA4
if: ${{ !cancelled() && github.ref_name == 'master' }}
run: tools/gh-report-failing-testcases-to-ga4.sh
coveralls_webhook:
needs: [big_tests, small_tests, dynamic_domains_big_tests]
runs-on: ubuntu-22.04
steps:
- name: Finish coveralls parallel build
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
dialyzer:
name: dialyzer on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
otp: [ '25.2' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
- run: tools/test.sh -p dialyzer_only
xref:
name: xref on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
otp: [ '25.2' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
- run: tools/test.sh -p xref_only
edoc:
name: edoc on OTP ${{matrix.otp}}
strategy:
fail-fast: false
matrix:
otp: [ '25.2' ]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
- run: tools/test.sh -p edoc_only
pkg:
name: ${{matrix.pkg}} package
strategy:
fail-fast: false
matrix:
pkg: [centos_7, ubuntu_xenial]
runs-on: ubuntu-22.04
env:
ESL_ERLANG_PKG_VER: "25.0.3-1"
pkg_PLATFORM: ${{matrix.pkg}}
steps:
- uses: actions/checkout@v3
- run: tools/test.sh -p pkg