Go modules
Start with the first-run guide. The example assumes an existing
repository and lockfile. Replace owner/repo with the project ID from your
dashboard, and use your repository's test command.
Configure dependencies and tests
version: 1
project_id: owner/repo
image: ubuntu-24.04-ci
network:
mode: none
warm_mode: allowlist
warm_allowlist: [proxy.golang.org, sum.golang.org, storage.googleapis.com]
cache:
key_files: [go.mod, go.sum]
checks:
dependencies:
command: go mod download
test:
command: go test ./...
The check must be named dependencies for Ready CI to run it automatically
before the selected test. Keep preparation enabled: an empty or evicted cache
needs these downloads before the offline test can run. Preparation uses
network.warm_mode and network.warm_allowlist; the test keeps network.mode: none.
The runner sets GOMODCACHE=/cache/go/pkg/mod and GOCACHE=/cache/go/build.
These built-in caches already live on the persistent cache disk; do not add
/cache paths to cache.paths. Use cache.paths only for additional directories
outside /cache.
Preview and run
readyci config validate
readyci check --dry-run --why --json test
readyci check test
Review the dry run's dependency preparation and allowed network hosts.
A successful test reports checks_passed and exits with code 0. Add
affected rules when different
changed paths should select different checks.
Check the remote environment
Your local operating system and installed tools are not copied into the runner.
This example uses ubuntu-24.04-ci. Run readyci doctor --check test --json
to inspect worker compatibility and check the installed tool versions:
readyci run "go version"
Compare those versions with your repository's requirements. A custom run
command does not prepare dependencies automatically. Declare installation
commands and permitted hosts explicitly if you need a different toolchain.
For failures, use dependency troubleshooting.