Skip to content

Commit 13a380e

Browse files
authored
Test CI against multiple OTP versions (24-28) (#140)
1 parent 2f29d75 commit 13a380e

2 files changed

Lines changed: 49 additions & 36 deletions

File tree

.github/workflows/test.yml

Lines changed: 48 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,43 +10,56 @@ on:
1010

1111
jobs:
1212
build:
13-
name: Test on OTP ${{ matrix.otp_version }} and ${{ matrix.os }}
13+
name: OTP ${{ matrix.otp_version }} / rebar3 ${{ matrix.rebar3_version }} / ${{ matrix.os }}
1414
runs-on: ${{ matrix.os }}
1515
strategy:
16-
fail-fast: false
1716
matrix:
18-
otp_version: ["26.1.2", "25.2", "24.3.4.7"]
19-
os: [ubuntu-22.04]
20-
rebar3_version: ["3.22.1"]
2117
include:
22-
- otp_version: "23.3.4.18"
23-
os: ubuntu-20.04
24-
rebar3_version: "3.20.0"
25-
- otp_version: "22.3.4.26"
26-
os: ubuntu-20.04
27-
rebar3_version: "3.18.0"
28-
env:
29-
OTP_VERSION: ${{ matrix.otp_version }}
18+
- otp_version: "24"
19+
rebar3_version: "3.21.0"
20+
os: ubuntu-latest
21+
- otp_version: "25"
22+
rebar3_version: "3.21.0"
23+
os: ubuntu-latest
24+
- otp_version: "26"
25+
rebar3_version: "3.25.1"
26+
os: ubuntu-latest
27+
- otp_version: "27"
28+
rebar3_version: "3.25.1"
29+
os: ubuntu-latest
30+
- otp_version: "28"
31+
rebar3_version: "3.25.1"
32+
os: ubuntu-latest
33+
3034
steps:
31-
- uses: actions/checkout@v4
32-
- uses: erlef/setup-beam@v1
33-
with:
34-
otp-version: ${{ matrix.otp_version }}
35-
rebar3-version: ${{ matrix.rebar3_version }}
36-
version-type: loose
37-
- uses: actions/cache@v3
38-
name: Cache
39-
with:
40-
path: |
41-
_build
42-
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ hashFiles(format('rebar.lock')) }}-1
43-
restore-keys: |
44-
${{ runner.os }}-build-${{ matrix.otp_version }}-1-
45-
- name: Compile
46-
run: rebar3 compile
47-
- name: Common Test tests
48-
run: rebar3 ct --cover
49-
- name: XRef
50-
run: rebar3 xref
51-
- name: Dialyzer
52-
run: rebar3 dialyzer
35+
- uses: actions/checkout@v5
36+
37+
- uses: erlef/setup-beam@v1
38+
with:
39+
otp-version: ${{ matrix.otp_version }}
40+
rebar3-version: ${{ matrix.rebar3_version }}
41+
42+
- uses: actions/cache@v4
43+
name: Cache
44+
with:
45+
path: |
46+
_build
47+
key: ${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.rebar3_version }}-${{ hashFiles(format('rebar.lock')) }}-1
48+
restore-keys: |
49+
${{ runner.os }}-build-${{ matrix.otp_version }}-${{ matrix.rebar3_version }}-1-
50+
51+
- name: Report
52+
run: rebar3 report "compile"
53+
54+
- name: Compile
55+
run: rebar3 compile
56+
57+
- name: Common Test tests
58+
run: rebar3 ct --cover
59+
60+
- name: XRef
61+
run: rebar3 xref
62+
63+
- name: Dialyzer
64+
run: rebar3 dialyzer
65+
if: ${{ matrix.otp_version == 28 }}

test/telemetry_SUITE.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ invoke_exception_span_handlers(Config) ->
385385
ExceptionEvent = EventPrefix ++ [exception],
386386
HandlerConfig = #{send_to => self()},
387387
StartMetadata = #{some => start_metadata, telemetry_span_context => ctx},
388-
SpanFunction = fun() -> 1 / 0 end,
388+
SpanFunction = fun() -> erlang:error(badarith) end,
389389

390390
telemetry:attach_many(HandlerId, [StartEvent, ExceptionEvent], fun ?MODULE:echo_event/4, HandlerConfig),
391391

0 commit comments

Comments
 (0)