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

Backport Aqua fixes to 1.10. #477

Merged
merged 2 commits into from
Nov 27, 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
45 changes: 45 additions & 0 deletions .github/workflows/CompatHelper.yml
Original file line number Diff line number Diff line change
@@ -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 }}
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
10 changes: 10 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
8 changes: 4 additions & 4 deletions test/ambiguous.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
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)
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
Loading