Skip to content

Commit f3735d5

Browse files
Run CI tests on Julia v1.11 too (#193)
* Run CI tests on Julia v1.11 too * Make junit reference tests v1.11 compatible * Skip reference tests on unrelease julia versions To try to make sure PkgEval failures on this package are real * Update UndefVarError test for v1.11 * fixup! Skip reference tests on unrelease julia versions * fixup! Update UndefVarError test for v1.11 * fixup! Update UndefVarError test for v1.11
1 parent 79cb313 commit f3735d5

File tree

4 files changed

+22
-4
lines changed

4 files changed

+22
-4
lines changed

.github/workflows/CI.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ jobs:
1818
matrix:
1919
version:
2020
- '1.8'
21-
- '1.9'
2221
- '1.10'
22+
- '1.11'
2323
os:
2424
- ubuntu-latest
2525
- macOS-latest

test/internals.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,13 @@ end
320320
@test_throws "Test item \"x\" `skip` keyword must be a `Bool`, got `skip=2`" should_skip(ti)
321321

322322
ti = @testitem("x", skip=:(x = 1; x + y), _run=false, begin end)
323-
@test_throws UndefVarError(:y) should_skip(ti)
323+
if v"1.11-" < VERSION < v"1.11.2"
324+
# Testing for a specific UndefVarError was broken in v1.11.0 and v1.11.1, see:
325+
# https://github.com/JuliaLang/julia/issues/54082
326+
@test_throws UndefVarError should_skip(ti)
327+
else
328+
@test_throws UndefVarError(:y) should_skip(ti)
329+
end
324330
end
325331

326332
@testset "filtering.jl" begin

test/junit_xml.jl

+6-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ using ReTestItems
1212
using DeepDiffs: deepdiff
1313

1414
# remove things that vary on each run: timestamps, run times, line numbers, repo locations
15+
# or which depend on the Julia VERSION being used
1516
function remove_variables(str)
1617
return replace(str,
1718
# Replace timestamps and times with "0"
@@ -33,7 +34,11 @@ function remove_variables(str)
3334
r"`" => "",
3435
# Remove blank lines in error messages (these were add in v1.9+)
3536
# https://github.com/JuliaLang/julia/commit/ba1e568966f82f4732f9a906ab186b02741eccb0
36-
r"\n\n" => "\n"
37+
r"\n\n" => "\n",
38+
# Remove the extra info added to `UndefVarError` messages in Julia v1.11
39+
# e.g. "UndefVarError: `x` not defined in ..." => "UndefVarError: x not defined"
40+
# see: https://github.com/JuliaLang/julia/commit/449c7a2504191a96cfd382e0dbc0b40bf922cd6d
41+
r"UndefVarError: `(?<var>[^`]*)` not defined in (.+)" => s"UndefVarError: \g<var> not defined",
3742
)
3843
end
3944

test/runtests.jl

+8-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,14 @@ end
2020
include("macros.jl")
2121
include("integrationtests.jl")
2222
include("log_capture.jl")
23-
include("junit_xml.jl")
23+
# junit_xml reference tests are very sensitive to changes in text output which is not
24+
# stable across minor Julia versions, i.e. we expect these to fail on upcoming Julia
25+
# releases so we may as well skip them (so PkgEval doesn't always fail for us).
26+
if isempty(VERSION.prerelease)
27+
include("junit_xml.jl")
28+
else
29+
@warn "Skipping JUnit XML reference tests on unrelease Julia version" VERSION
30+
end
2431
end
2532

2633
# After all tests have run, check we didn't leave Test printing disabled.

0 commit comments

Comments
 (0)