Here's an example of the behaviour inside the CI environment with package names replaced with placeholders (emulating some of what Pkg.test does):
julia> using Pkg
julia> Pkg.instantiate(; allow_autoprecomp=false)
Cloning [0541aee2-...] Y from https://github.com/...
Installed Y ─ v0.6.2
false
julia> Pkg.resolve()
ERROR: Unsatisfiable requirements detected for package X [0541aee2]:
Y [0541aee2] log:
├─possible versions are: 0.0.1-0.6.1 or uninstalled
└─restricted to versions 0.6.2-0.6 by X [7d1a9472] — no versions left
└─X [7d1a9472] log:
├─possible versions are: 0.2.0 or uninstalled
└─X [7d1a9472] is fixed to version 0.2.0
julia> using Y
julia> pkgversion(Y)
v"0.6.2"
From what I've gathered it seems that Pkg.instantiate is actually finding and installing the version required but when Pkg.test attempts a re-resolve it fails as the registry doesn't contain an entry for that item. Probably Pkg.test should update the registries when attempting a re-resolve.
The quick work around for this is to run Pkg.Registry.update() immediately after julia-actions/cache to ensure the registries are up to date before running julia-actions/runtest.
It appears that my assessment that enabling
cache-registries: true
by default was safe was incorrect. For projects that commit aManifest.toml
the registry may not get updated inPkg.instantiate
. Specifically, while performing some interactive CI debugging I found that this line fails only throws an exception when a package is missing from the registry and not when a package version is missing.The reason for filing this issue in
julia-actions/cache
is that we may want to reconsider havingcache-registries
default totrue
.As for the original problem here's the a portion of the workflow YAML:
And here's the logs from
julia-actions/julia-runtest
with the private package names replaced with placeholders:Here's an example of the behaviour inside the CI environment with package names replaced with placeholders (emulating some of what
Pkg.test
does):From what I've gathered it seems that
Pkg.instantiate
is actually finding and installing the version required but whenPkg.test
attempts a re-resolve it fails as the registry doesn't contain an entry for that item. ProbablyPkg.test
should update the registries when attempting a re-resolve.