Skip to content

Commit 722e316

Browse files
authored
Test on the latest Erlang/Elixir in CI (#841)
1 parent c565390 commit 722e316

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,29 @@ env:
1414
jobs:
1515
test:
1616
name: Test (Elixir ${{ matrix.elixir }}, OTP ${{ matrix.otp }})
17-
runs-on: ubuntu-20.04
17+
runs-on: ${{ matrix.os }}
1818
timeout-minutes: 10
1919
strategy:
2020
fail-fast: false
2121
matrix:
2222
# https://hexdocs.pm/elixir/compatibility-and-deprecations.html#compatibility-between-elixir-and-erlang-otp
2323
include:
2424
# Newest supported Elixir/Erlang pair.
25-
- elixir: '1.17'
26-
otp: '27.1'
25+
- elixir: '1.18'
26+
otp: '27.2'
2727
lint: true
2828
dialyzer: true
29+
os: ubuntu-latest
2930

3031
# One version before the last supported one.
31-
- elixir: '1.16'
32+
- elixir: '1.17'
3233
otp: '26.2'
34+
os: ubuntu-22.04
3335

3436
# Oldest supported Elixir/Erlang pair.
3537
- elixir: '1.13.4-otp-22'
3638
otp: '22.3.4'
39+
os: ubuntu-20.04
3740

3841
steps:
3942
- name: Check out this repository

test/envelope_test.exs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,5 @@ defmodule Sentry.EnvelopeTest do
144144
event_id: Sentry.UUID.uuid4_hex(),
145145
timestamp: "2024-10-12T13:21:13"
146146
}) == "error"
147-
148-
assert_raise FunctionClauseError,
149-
fn -> Envelope.get_data_category(:completely_banana_value) end
150147
end
151148
end

test/sentry/client_test.exs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,12 @@ defmodule Sentry.ClientTest do
234234
put_test_config(before_send: {CallbackModuleArithmeticError, :before_send})
235235

236236
try do
237-
:rand.uniform() + "1"
237+
# This is the equivalent of
238+
#
239+
# :rand.uniform() + "1"
240+
#
241+
# but made dynamic to avoid type warnings.
242+
apply(Kernel, :+, [:rand.uniform(), "1"])
238243
rescue
239244
exception ->
240245
event = Event.transform_exception(exception, _opts = [])

test/sentry/logger_handler_test.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,8 @@ defmodule Sentry.LoggerHandlerTest do
635635
end
636636

637637
defp invalid_function do
638-
NaiveDateTime.from_erl({}, {}, {})
638+
# This needs to be dynamic in order to not warn with Elixir's type system
639+
apply(NaiveDateTime, :from_erl, [{}, {}, {}])
639640
end
640641

641642
defp enable_sasl_reports do

0 commit comments

Comments
 (0)