From c2666ea8df562bd6b70bb885810bea87dd902782 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Mon, 18 Dec 2023 21:46:52 +0530 Subject: [PATCH] ci: add typos and Aqua CI --- .github/workflows/CI.yml | 1 - .github/workflows/Downstream.yml | 2 +- .github/workflows/SpellCheck.yml | 13 +++++++++++++ .typos.toml | 1 + Project.toml | 15 +++++++++++++++ test/qa.jl | 11 +++++++++++ test/runtests.jl | 8 +++----- 7 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/SpellCheck.yml create mode 100644 .typos.toml create mode 100644 test/qa.jl diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index b56df0cf..15f8ddb8 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -20,7 +20,6 @@ jobs: - Downstream version: - '1' - - '1.6' steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v1 diff --git a/.github/workflows/Downstream.yml b/.github/workflows/Downstream.yml index 01804811..519640b6 100644 --- a/.github/workflows/Downstream.yml +++ b/.github/workflows/Downstream.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: false matrix: - julia-version: [1,1.6] + julia-version: [1] os: [ubuntu-latest] package: - {user: SciML, repo: SciMLBase.jl, group: Core} diff --git a/.github/workflows/SpellCheck.yml b/.github/workflows/SpellCheck.yml new file mode 100644 index 00000000..599253c8 --- /dev/null +++ b/.github/workflows/SpellCheck.yml @@ -0,0 +1,13 @@ +name: Spell Check + +on: [pull_request] + +jobs: + typos-check: + name: Spell Check with Typos + runs-on: ubuntu-latest + steps: + - name: Checkout Actions Repository + uses: actions/checkout@v3 + - name: Check spelling + uses: crate-ci/typos@v1.16.23 \ No newline at end of file diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..79b68a4c --- /dev/null +++ b/.typos.toml @@ -0,0 +1 @@ +[default.extend-words] \ No newline at end of file diff --git a/Project.toml b/Project.toml index 60103fbf..c8fde76e 100644 --- a/Project.toml +++ b/Project.toml @@ -31,16 +31,31 @@ RecursiveArrayToolsZygoteExt = "Zygote" [compat] Adapt = "3, 4" +Aqua = "0.8" ArrayInterface = "7" DocStringExtensions = "0.8, 0.9" +ForwardDiff = "0.10" GPUArraysCore = "0.1" IteratorInterfaceExtensions = "1" +LabelledArrays = "1" +LinearAlgebra = "1" +Measurements = "2" +MonteCarloMeasurements = "1" +NLsolve = "4" +Pkg = "1" +Random = "1" RecipesBase = "0.7, 0.8, 1.0" Requires = "1.0" +SafeTestsets = "0.1" +StaticArrays = "0.12" StaticArraysCore = "1.1" Statistics = "1" +StructArrays = "0.6" SymbolicIndexingInterface = "0.3" Tables = "1" +Test = "1" +Tracker = "0.2" +Unitful = "1" Zygote = "0.6.56" julia = "1.9" diff --git a/test/qa.jl b/test/qa.jl new file mode 100644 index 00000000..2498c8bb --- /dev/null +++ b/test/qa.jl @@ -0,0 +1,11 @@ +using RecursiveArrayTools, Aqua +@testset "Aqua" begin + Aqua.find_persistent_tasks_deps(RecursiveArrayTools) + Aqua.test_ambiguities(RecursiveArrayTools, recursive = false, broken = true) + Aqua.test_deps_compat(RecursiveArrayTools) + Aqua.test_piracies(RecursiveArrayTools) + Aqua.test_project_extras(RecursiveArrayTools) + Aqua.test_stale_deps(RecursiveArrayTools) + Aqua.test_unbound_args(RecursiveArrayTools) + Aqua.test_undefined_exports(RecursiveArrayTools) +end diff --git a/test/runtests.jl b/test/runtests.jl index f725cc30..97d6b9e7 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,13 +1,8 @@ using Pkg using RecursiveArrayTools using Test -using Aqua using SafeTestsets -if VERSION >= v"1.9" - Aqua.test_all(RecursiveArrayTools, ambiguities = false) -end - @test_broken isempty(Test.detect_ambiguities(RecursiveArrayTools)) const GROUP = get(ENV, "GROUP", "All") const is_APPVEYOR = (Sys.iswindows() && haskey(ENV, "APPVEYOR")) @@ -26,6 +21,9 @@ end @time begin if GROUP == "Core" || GROUP == "All" + @time @safetestset "Quality Assurance" begin + include("qa.jl") + end @time @safetestset "Utils Tests" begin include("utils_test.jl") end