Artifact not found for test in Github CI

Hi,

I am trying to use an artifact download from zenodo during the test (and also in the doc).

I was able to figure out a way to use it for the doc but it keeps failing in the github CI :

     Testing Running tests...
ERROR: LoadError: Artifact "MP2RAGE_data" was not found by looking in the paths:
  ~/.julia/artifacts/04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369
  /opt/hostedtoolcache/julia/1.10.6/x64/local/share/julia/artifacts/04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369
  /opt/hostedtoolcache/julia/1.10.6/x64/share/julia/artifacts/04cd4c29bb9e2aeb5384fbc70a9af0e1a37ca369
Try `using Pkg; Pkg.instantiate()` to re-install all missing resources if the artifact is part of a package or call `Pkg.ensure_artifact_installed` (https://pkgdocs.julialang.org/v1/api/#Pkg.Artifacts.ensure_artifact_installed) if not.

you can find the package here : GitHub - CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360

Do you have any idea why it fails ?

The main difference I can see between docs and test is that you have Project.toml in docs but not in test. For ZipArchives.jl I have a Project.toml also in the test folder, and CI seems to be able to install the test artifacts. ZipArchives.jl/test/Project.toml at main · JuliaIO/ZipArchives.jl · GitHub

Moving Artifacts.toml to the root folder (not in test) works but I hope it will not be download during the add MyPackage

Ok it works but artifacts are downloaded during the installation.

I was able to make it works with the following code in runtests.jl :

using Pkg
using Artifacts

toml = Artifacts.find_artifacts_toml(@__DIR__)
const datadir = Pkg.Artifacts.ensure_artifact_installed("MP2RAGE_data", toml)

the Artifacts.toml file is in test and is not downloaded while adding the package.