Skip to content

Commit

Permalink
support JULIA_REFERENCETESTS_UPDATE env var in tests (#486)
Browse files Browse the repository at this point in the history
to disable the interactive prompt as it was somehow broken for me
locally. Also bumps the Julia version for reference tests to 1.10.6
  • Loading branch information
simeonschaub authored Nov 13, 2024
1 parent 991ab73 commit fb5200d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
# require this specific job to pass on all PRs
# (see Settings > Branches > Branch protection rules).
- os: ubuntu-latest
version: 1.10.0
version: 1.10.6
arch: x64
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/WackyOptions/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.10.0"
julia_version = "1.10.6"
manifest_format = "2.0"
project_hash = "4cda5991eecc2e1d07ef87b0be009754a63f367f"

Expand Down
4 changes: 3 additions & 1 deletion test/reference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ function test_reference(reference, comparison)
println("Reference: $reference")
println("Comparison: $comparison")
update = false
if PROMPT
if haskey(ENV, "JULIA_REFERENCETESTS_UPDATE")
copy_file(comparison, reference)
elseif PROMPT
while true
println("Update reference file? [y/n]")
answer = lowercase(strip(readline()))
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mktempdir() do dir
# and the test fixtures are made with Julia 1.10.0
# TODO: Keep this on the latest stable Julia version, and update
# the version used by the corresponding CI job at the same time.
REFERENCE_VERSION = v"1.10.0"
REFERENCE_VERSION = v"1.10.6"
if VERSION == REFERENCE_VERSION
# Ideally we'd use `with_clean_gitconfig`, but it's way too slow.
branch = LibGit2.getconfig(
Expand Down

0 comments on commit fb5200d

Please sign in to comment.