Skip to content

Commit 56e562b

Browse files
stolenDanil Zagoskin
authored andcommitted
define tests workflow
1 parent 600a243 commit 56e562b

2 files changed

Lines changed: 65 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Erlang CI
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
common_test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
otp_ver: [27, 28, latest]
18+
container:
19+
image: erlang:${{ matrix.otp_ver }}
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Run tests
24+
env:
25+
REBAR_CONFIG: rebar.config_
26+
run: rebar3 as dev ct --logdir test-logs --readable true -vv
27+
- name: upload CT report
28+
uses: actions/upload-artifact@v4
29+
with:
30+
name: ct_report_${{ matrix.otp_ver }}
31+
path: test-logs/ct_run*/
32+
33+
common_test_legacy:
34+
runs-on: ubuntu-latest
35+
strategy:
36+
matrix:
37+
otp_ver: [24, 25, 26]
38+
container:
39+
image: erlang:${{ matrix.otp_ver }}
40+
41+
steps:
42+
- uses: actions/checkout@v4
43+
- name: Run tests
44+
env:
45+
REBAR_CONFIG: rebar.config.pre27_
46+
run: rebar3 as dev ct --logdir test-logs --readable true -vv
47+
- name: upload CT report
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: ct_report_${{ matrix.otp_ver }}
51+
path: test-logs/ct_run*/

rebar.config.pre27_

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
% No deps by default to prevent conflicts
2+
{deps, [
3+
]}.
4+
5+
{profiles, [
6+
{dev, [
7+
{deps, [
8+
jsx,
9+
{cowboy, "2.12.0"},
10+
redbug
11+
]},
12+
{ct_opts, [{ct_hooks, [cth_surefire]}]}
13+
]}
14+
]}.

0 commit comments

Comments
 (0)