Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compat. Allow newer Aqua. Only run Aqua on repo tests. #471

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ jobs:
- run: julia --color=yes .ci/test_and_change_uuid.jl
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
SPARSEARRAYS_AQUA_TEST: true
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
with:
Expand Down
11 changes: 10 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,17 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c"

[compat]
Aqua = "0.7"
Aqua = "0.7, 0.8"
Dates = "<0.0.1, 1"
InteractiveUtils = "<0.0.1, 1"
Libdl = "<0.0.1, 1"
LinearAlgebra = "<0.0.1, 1"
Pkg = "<0.0.1, 1"
Printf = "<0.0.1, 1"
Random = "<0.0.1, 1"
Serialization = "<0.0.1, 1"
SuiteSparse_jll = "7.2.1"
Test = "<0.0.1, 1"
julia = "1.11"

[extras]
Expand Down
8 changes: 4 additions & 4 deletions test/ambiguous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ if Base.find_package("Aqua") === nothing
iob = IOBuffer()
Pkg.activate(; temp = true)
try
Pkg.add("Aqua", io=iob) # Needed for custom julia version resolve tests
# TODO: make this version tie to compat in Project.toml
# or do this another safer way
Pkg.add(name="Aqua", version="0.8", io=iob) # Needed for custom julia version resolve tests
catch
println(String(take!(iob)))
rethrow()
Expand Down Expand Up @@ -44,9 +46,7 @@ using Test, LinearAlgebra, SparseArrays, Aqua
@testset "Compat bounds" begin
Aqua.test_deps_compat(SparseArrays)
end
@testset "Project.toml formatting" begin
Aqua.test_project_toml_formatting(SparseArrays)
end

@testset "Piracy" begin
@test_broken Aqua.Piracy.hunt(SparseArrays) == Method[]
end
Expand Down
4 changes: 4 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# This file is a part of Julia. License is MIT: https://julialang.org/license
using Test, LinearAlgebra, SparseArrays

if Base.get_bool_env("SPARSEARRAYS_AQUA_TEST", false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be easier to just use

Suggested change
if Base.get_bool_env("SPARSEARRAYS_AQUA_TEST", false)
if get(ENV, "SPARSEARRAYS_AQUA_TEST", nothing) === "true"

since this isn't something people will configure in general (and thus not forget whether it is 1 or true).

include("ambiguous.jl")
end

for file in readlines(joinpath(@__DIR__, "testgroups"))
file == "" && continue # skip empty lines
include(file * ".jl")
Expand Down
1 change: 0 additions & 1 deletion test/testgroups
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
allowscalar
ambiguous
cholmod
fixed
higherorderfns
Expand Down