From 8d56af9b946c32d375820112bbb53221c5aeea78 Mon Sep 17 00:00:00 2001 From: Gabriele Bozzola Date: Tue, 4 Jun 2024 16:25:03 -0700 Subject: [PATCH] Add Artifacts.toml to test This is needed because test uses the precipitation_obs artifact --- .github/workflows/ci.yml | 5 ----- test/Artifacts.toml | 13 +++++++++++++ test/Project.toml | 1 + test/runtests.jl | 10 ++++++++++ 4 files changed, 24 insertions(+), 5 deletions(-) create mode 100644 test/Artifacts.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94685edcc..d15f644f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,11 +36,6 @@ jobs: arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - - # Needed to download its unique artifacts - - name: "Instantiate ClimaEarth" - run: julia --color=yes --project=experiments/ClimaEarth -e 'using Pkg; Pkg.instantiate()' - - uses: julia-actions/julia-runtest@v1 - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 diff --git a/test/Artifacts.toml b/test/Artifacts.toml new file mode 100644 index 000000000..e3b19ade8 --- /dev/null +++ b/test/Artifacts.toml @@ -0,0 +1,13 @@ +[cmip_model_rmse] +git-tree-sha1 = "aa2d5178a656e9ce7a37698d978d8ed92aa46d99" + + [[cmip_model_rmse.download]] + sha256 = "b019d40510cebc678899a74d2cf14e33aa60452805478b2bf7176b891012aa97" + url = "https://caltech.box.com/shared/static/lmzvnjkxctlb0fanieeqxll0vdrbei9e.gz" + +[precipitation_obs] +git-tree-sha1 = "7486bf32e9352493f69364aead26f01eaf90d2af" + + [[precipitation_obs.download]] + sha256 = "463ebc1886c4e0be9656656da699f2cbb87d7c2568d5e81277c0c8a415dc8143" + url = "https://caltech.box.com/shared/static/j63uak557kw7tlzb3dgwifoaeczekzm4.gz" diff --git a/test/Project.toml b/test/Project.toml index 440a29048..4cf675d1b 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -3,6 +3,7 @@ Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" ArtifactWrappers = "a14bc488-3040-4b00-9dc1-f6467924858a" +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" ClimaAnalysis = "29b5916a-a76c-4e73-9657-3c8fd22e65e6" diff --git a/test/runtests.jl b/test/runtests.jl index da3c743c5..fc9ad7061 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,8 +1,18 @@ import SafeTestsets: @safetestset import ClimaComms +import Pkg, Artifacts gpu_broken = ClimaComms.device() isa ClimaComms.CUDADevice +# Download test-only artifacts +# +# (Currently not natively supported by Julia) +artifacts_toml = joinpath(@__DIR__, "Artifacts.toml") +artifacts = Artifacts.select_downloadable_artifacts(artifacts_toml) +for name in keys(artifacts) + Pkg.Artifacts.ensure_artifact_installed(name, artifacts[name], artifacts_toml) +end + @safetestset "Aqua tests" begin include("aqua.jl") end