# Artifact not found for test in Github CI

**URL:** https://discourse.julialang.org/t/artifact-not-found-for-test-in-github-ci/122697
**Category:** General Usage
**Created:** [November 15, 2024, 10:06pm UTC](https://discourse.julialang.org/t/artifact-not-found-for-test-in-github-ci/122697 "2024-11-15T22:06:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![aTrotier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atrotier/32/32165_2.png) [@aTrotier](https://discourse.julialang.org/u/aTrotier)
#### Post date: [November 15, 2024, 10:06pm UTC](https://discourse.julialang.org/t/artifact-not-found-for-test-in-github-ci/122697/1 "2024-11-15T22:06:44Z")

</div>

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 :

```julia
     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](https://github.com/CRMSB/SEQ_BRUKER_a_MP2RAGE_CS_360)

Do you have any idea why it fails ?

---

<div class="post-metadata">

### Author: ![nhz2](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nhz2/32/44428_2.png) [@nhz2](https://discourse.julialang.org/u/nhz2)
#### Post date: [November 17, 2024, 5:01pm UTC](https://discourse.julialang.org/t/artifact-not-found-for-test-in-github-ci/122697/2 "2024-11-17T17:01:31Z")

</div>

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](https://github.com/JuliaIO/ZipArchives.jl/blob/main/test/Project.toml)

---

<div class="post-metadata">

### Author: ![aTrotier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atrotier/32/32165_2.png) [@aTrotier](https://discourse.julialang.org/u/aTrotier)
#### Post date: [November 18, 2024, 9:55am UTC](https://discourse.julialang.org/t/artifact-not-found-for-test-in-github-ci/122697/3 "2024-11-18T09:55:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![aTrotier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/atrotier/32/32165_2.png) [@aTrotier](https://discourse.julialang.org/u/aTrotier)
#### Post date: [November 18, 2024, 2:31pm UTC](https://discourse.julialang.org/t/artifact-not-found-for-test-in-github-ci/122697/4 "2024-11-18T14:31:50Z")

</div>

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

```julia
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.
