For example in the workflow output we can see something like
│ To reproduce this CI run locally run the following from the same repository state on julia version 1.10.8:
│
│ `import Pkg; Pkg.test(;coverage=true, julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], force_latest_compatible_version=false, allow_reresolve=true)`
│
But this won't work, the command needs to be
JULIA_PKG_SERVER_REGISTRY_PREFERENCE=eager GROUP=AD AD=ReverseDiff julia --project=. -e 'import Pkg; Pkg.test(;coverage=true, julia_args=["--check-bounds=yes", "--compiled-modules=yes", "--depwarn=yes"], force_latest_compatible_version=false, allow_reresolve=true)'
As @penelopeysm pointed out the --project needs specified.