diff --git a/.github/workflows/CI-CheckBy.yml b/.github/workflows/CI-CheckBy.yml new file mode 100644 index 00000000..509e217b --- /dev/null +++ b/.github/workflows/CI-CheckBy.yml @@ -0,0 +1,52 @@ +name: CI-CheckBy +on: + schedule: + - cron: '0 0 * * 0' + push: + branches: + - main + tags: + - v* + pull_request: + release: + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} +jobs: + run: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + group: + - CheckByAqua + - CheckByJET + - CheckByExplicitImports + version: + - release + - lts + - nightly + os: + - ubuntu-latest + # - macOS-latest + # - windows-latest + steps: + - uses: actions/checkout@v4 + - uses: julia-actions/install-juliaup@v2 + with: + channel: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + - uses: julia-actions/julia-buildpkg@v1 + - uses: julia-actions/julia-runtest@v1 + env: + GROUP: ${{ matrix.group }} + - uses: julia-actions/julia-processcoverage@v1 + - uses: codecov/codecov-action@v5 + with: + files: lcov.info + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true + # - uses: julia-actions/julia-uploadcoveralls@v1 + # env: + # COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f173b0d9..fe47ee29 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -25,8 +25,6 @@ jobs: - SmokeXYOut - SmokeXYIn - Regression - - Quality - - Instability version: - release - lts diff --git a/test/Project.toml b/test/Project.toml index e714d422..ea7a6dcc 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -6,6 +6,7 @@ DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" DifferentiationInterface = "a0c0ee7d-e4b9-4e03-894e-1c5f64a51d63" Distances = "b4f34e82-e78d-54a5-968a-f98e89d6e8f7" Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210" JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" @@ -28,6 +29,7 @@ DataFrames = "1" DifferentiationInterface = "0.7" Distances = "0.10" Distributions = "0.25" +ExplicitImports = "1" ForwardDiff = "1" JET = "0.9, 0.10" Lux = "1" diff --git a/test/checkby_Aqua_tests.jl b/test/checkby_Aqua_tests.jl new file mode 100644 index 00000000..ffec5c16 --- /dev/null +++ b/test/checkby_Aqua_tests.jl @@ -0,0 +1,3 @@ +Test.@testset "CheckByAqua" begin + Aqua.test_all(ContinuousNormalizingFlows) +end diff --git a/test/checkby_ExplicitImports_tests.jl b/test/checkby_ExplicitImports_tests.jl new file mode 100644 index 00000000..e4085485 --- /dev/null +++ b/test/checkby_ExplicitImports_tests.jl @@ -0,0 +1,23 @@ +Test.@testset "CheckByExplicitImports" begin + Test.@test isnothing( + ExplicitImports.check_no_implicit_imports(ContinuousNormalizingFlows), + ) + Test.@test isnothing( + ExplicitImports.check_all_explicit_imports_via_owners(ContinuousNormalizingFlows), + ) + Test.@test isnothing( + ExplicitImports.check_all_explicit_imports_are_public(ContinuousNormalizingFlows), + ) + Test.@test isnothing( + ExplicitImports.check_no_stale_explicit_imports(ContinuousNormalizingFlows), + ) + Test.@test isnothing( + ExplicitImports.check_all_qualified_accesses_via_owners(ContinuousNormalizingFlows), + ) + Test.@test isnothing( + ExplicitImports.check_all_qualified_accesses_are_public(ContinuousNormalizingFlows), + ) + Test.@test isnothing( + ExplicitImports.check_no_self_qualified_accesses(ContinuousNormalizingFlows), + ) +end diff --git a/test/instability_tests.jl b/test/checkby_JET_tests.jl similarity index 98% rename from test/instability_tests.jl rename to test/checkby_JET_tests.jl index e8c52728..fe247500 100644 --- a/test/instability_tests.jl +++ b/test/checkby_JET_tests.jl @@ -1,4 +1,4 @@ -Test.@testset "Instability" begin +Test.@testset "CheckByJET" begin JET.test_package( ContinuousNormalizingFlows; target_modules = [ContinuousNormalizingFlows], diff --git a/test/quality_tests.jl b/test/quality_tests.jl deleted file mode 100644 index 4f899c43..00000000 --- a/test/quality_tests.jl +++ /dev/null @@ -1,6 +0,0 @@ -Test.@testset "Quality" begin - Test.@testset "Method ambiguity" begin - Aqua.test_ambiguities(ContinuousNormalizingFlows) - end - Aqua.test_all(ContinuousNormalizingFlows; ambiguities = (GROUP == "All")) -end diff --git a/test/runtests.jl b/test/runtests.jl index 70660594..23c12139 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,6 +5,7 @@ import ADTypes, DifferentiationInterface, Distances, Distributions, + ExplicitImports, ForwardDiff, JET, Logging, @@ -34,15 +35,19 @@ Test.@testset "Overall" begin include("smoke_tests.jl") end - if GROUP == "All" || GROUP == "Quality" - include("quality_tests.jl") + if GROUP == "All" || GROUP == "Regression" + include("regression_tests.jl") end - if GROUP == "All" || GROUP == "Instability" - include("instability_tests.jl") + if GROUP == "All" || GROUP == "CheckByAqua" + include("checkby_Aqua_tests.jl") end - if GROUP == "All" || GROUP == "Regression" - include("regression_tests.jl") + if GROUP == "All" || GROUP == "CheckByJET" + include("checkby_JET_tests.jl") + end + + if GROUP == "All" || GROUP == "CheckByExplicitImports" + include("checkby_ExplicitImports_tests.jl") end end