Test runner: per-project cache (tool caches, shared dirs, seeds)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a083798d7f
commit
b9df00422a
5 files changed
+220
-3
No files matched your search
@@ -373,6 +373,23 @@ helper services and network are removed (leftovers are swept at startup and afte
|
||||
}
|
||||
```
|
||||
|
||||
Between runs of one project the runner keeps a cache volume: npm/Yarn, pip, Go and Cargo caches
|
||||
(including the Cargo target directory) are shared automatically. For more, add to `setup.json`:
|
||||
|
||||
```json
|
||||
"cache": {
|
||||
"dirs": ["build/downloads"],
|
||||
"seed": { "paths": ["data/ubuntu.ext4"], "key": ["guest", "lib", "scripts", "package-lock.json"] }
|
||||
}
|
||||
```
|
||||
|
||||
`dirs` persist and are shared by all runs (use them for downloads, not for results). A `seed`
|
||||
holds expensive *results* of `install`: it is stored after a successful install under a key made
|
||||
from the image, the install command, the seed paths and the contents of the `key` files or
|
||||
directories, and copied into a fresh container only while that key matches – so a run never
|
||||
inherits changes from an earlier one, and editing a listed source rebuilds it. `"cache": false`
|
||||
disables caching; `DELETE /v1/cache/<project>` on the runner clears one project.
|
||||
|
||||
`image` defaults to `RUNNER_DEFAULT_IMAGE`; `"dockerfile": "path"` builds the image from the
|
||||
repository instead; helper services are reachable by their name. Containers run without extra
|
||||
capabilities, with memory/CPU/process limits (`RUNNER_MEMORY`, `RUNNER_CPUS`), and cannot see the
|
||||
|
||||
Reference in new issue
Block a user