From ee10c7f1ae6a085cd61ebd0e483d408dc3821482 Mon Sep 17 00:00:00 2001 From: aTrotier Date: Mon, 18 Nov 2024 15:35:08 +0100 Subject: [PATCH] fixing artifacts in tests(#1) --- .github/workflows/CI.yml | 11 +---------- Project.toml | 5 +++-- test/runtests.jl | 7 +++++-- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f06972d..bd0adaa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -37,16 +37,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v3 - env: - cache-name: cache-artifacts - with: - path: ~/.julia/artifacts - key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} - restore-keys: | - ${{ runner.os }}-test-${{ env.cache-name }}- - ${{ runner.os }}-test- - ${{ runner.os }}- + - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 docs: diff --git a/Project.toml b/Project.toml index 0672382..22c7a09 100644 --- a/Project.toml +++ b/Project.toml @@ -4,6 +4,7 @@ authors = ["aTrotier and contributors"] version = "0.0.1" [deps] +Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33" JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" MRICoilSensitivities = "c57eb701-aafc-44a2-a53c-128049758959" MRIFiles = "5a6f062f-bf45-497d-b654-ad17aae2a530" @@ -25,8 +26,8 @@ Statistics = "1.10" julia = "1.10" [extras] -Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3" +Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test","LazyArtifacts"] +test = ["Test", "LazyArtifacts"] diff --git a/test/runtests.jl b/test/runtests.jl index d1bba5e..6bd253c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,9 +4,12 @@ using LazyArtifacts using SEQ_BRUKER_a_MP2RAGE_CS_360.NIfTI using SEQ_BRUKER_a_MP2RAGE_CS_360.JSON using Pkg +using Artifacts -Pkg.instantiate() -const datadir = joinpath(artifact"MP2RAGE_data") +toml = Artifacts.find_artifacts_toml(@__DIR__) + + +const datadir = Pkg.Artifacts.ensure_artifact_installed("MP2RAGE_data", toml) @info "The test data is located at $datadir." @testset "SEQ_BRUKER_a_MP2RAGE_CS_360.jl" begin