Skip to content

Commit ee10c7f

Browse files
authored
fixing artifacts in tests(#1)
1 parent 17d024a commit ee10c7f

File tree

3 files changed

+9
-14
lines changed

3 files changed

+9
-14
lines changed

.github/workflows/CI.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,7 @@ jobs:
3737
with:
3838
version: ${{ matrix.version }}
3939
arch: ${{ matrix.arch }}
40-
- uses: actions/cache@v3
41-
env:
42-
cache-name: cache-artifacts
43-
with:
44-
path: ~/.julia/artifacts
45-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
46-
restore-keys: |
47-
${{ runner.os }}-test-${{ env.cache-name }}-
48-
${{ runner.os }}-test-
49-
${{ runner.os }}-
40+
- uses: julia-actions/cache@v2
5041
- uses: julia-actions/julia-buildpkg@v1
5142
- uses: julia-actions/julia-runtest@v1
5243
docs:

Project.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ authors = ["aTrotier <a.trotier@gmail.com> and contributors"]
44
version = "0.0.1"
55

66
[deps]
7+
Artifacts = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
78
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
89
MRICoilSensitivities = "c57eb701-aafc-44a2-a53c-128049758959"
910
MRIFiles = "5a6f062f-bf45-497d-b654-ad17aae2a530"
@@ -25,8 +26,8 @@ Statistics = "1.10"
2526
julia = "1.10"
2627

2728
[extras]
28-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
2929
LazyArtifacts = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
30+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3031

3132
[targets]
32-
test = ["Test","LazyArtifacts"]
33+
test = ["Test", "LazyArtifacts"]

test/runtests.jl

+5-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ using LazyArtifacts
44
using SEQ_BRUKER_a_MP2RAGE_CS_360.NIfTI
55
using SEQ_BRUKER_a_MP2RAGE_CS_360.JSON
66
using Pkg
7+
using Artifacts
78

8-
Pkg.instantiate()
9-
const datadir = joinpath(artifact"MP2RAGE_data")
9+
toml = Artifacts.find_artifacts_toml(@__DIR__)
10+
11+
12+
const datadir = Pkg.Artifacts.ensure_artifact_installed("MP2RAGE_data", toml)
1013
@info "The test data is located at $datadir."
1114

1215
@testset "SEQ_BRUKER_a_MP2RAGE_CS_360.jl" begin

0 commit comments

Comments
 (0)