diff --git a/.github/workflows/CompatHelper.yml b/.github/workflows/CompatHelper.yml new file mode 100644 index 00000000..09181610 --- /dev/null +++ b/.github/workflows/CompatHelper.yml @@ -0,0 +1,45 @@ +name: CompatHelper +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: +permissions: + contents: write + pull-requests: write +jobs: + CompatHelper: + runs-on: ubuntu-latest + steps: + - name: Check if Julia is already available in the PATH + id: julia_in_path + run: which julia + continue-on-error: true + - name: Install Julia, but only if it is not already available in the PATH + uses: julia-actions/setup-julia@v1 + with: + version: '1' + arch: ${{ runner.arch }} + if: steps.julia_in_path.outcome != 'success' + - name: "Add the General registry via Git" + run: | + import Pkg + ENV["JULIA_PKG_SERVER"] = "" + Pkg.Registry.add("General") + shell: julia --color=yes {0} + - name: "Install CompatHelper" + run: | + import Pkg + name = "CompatHelper" + uuid = "aa819f21-2bde-4658-8897-bab36330d9b7" + version = "3" + Pkg.add(; name, uuid, version) + shell: julia --color=yes {0} + - name: "Run CompatHelper" + run: | + import CompatHelper + CompatHelper.main() + shell: julia --color=yes {0} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }} + # COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b7086e0..faeaf424 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/Project.toml b/Project.toml index 088818ff..fac1058d 100644 --- a/Project.toml +++ b/Project.toml @@ -10,7 +10,17 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" SuiteSparse_jll = "bea87d4a-7f5b-5778-9afe-8cc45184846c" [compat] +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.10" [extras] diff --git a/test/ambiguous.jl b/test/ambiguous.jl index 00c892f5..4b81ae2f 100644 --- a/test/ambiguous.jl +++ b/test/ambiguous.jl @@ -14,7 +14,9 @@ if Base.find_package("Aqua") === nothing @debug "Installing Aqua.jl for SparseArrays.jl tests" iob = IOBuffer() 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() @@ -42,9 +44,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 diff --git a/test/runtests.jl b/test/runtests.jl index 6e3ca497..3eb1de97 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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) + include("ambiguous.jl") +end + for file in readlines(joinpath(@__DIR__, "testgroups")) file == "" && continue # skip empty lines include(file * ".jl") diff --git a/test/testgroups b/test/testgroups index bd8f928f..a547762c 100644 --- a/test/testgroups +++ b/test/testgroups @@ -1,5 +1,4 @@ allowscalar -ambiguous cholmod fixed higherorderfns