Skip to content

Caches, artifacts and services

A cache is restored before a job’s steps and saved after. Keys are usually derived from a lockfile hash.

cache:
- key: go-${{ hashFiles("go.sum") }}
restore_keys: [go-]
paths: [~/go/pkg/mod]
  • On a hit for key, the cache is restored and not re-saved.
  • On a miss, restore_keys are tried in order as prefixes; the newest match is restored and the cache is saved under key at the end of a successful job.
  • Cache entries are scoped by branch or project and are stored in S3-compatible storage. They are evicted by least-recently-hit.

Upload files from a job, then download them in later jobs or from the UI.

artifacts: # shorthand for upload at the end of the job
- { name: coverage, path: coverage/**, when: always, retention: 14d }

Or as steps:

- uses: slipway/artifact-upload@v1
with: { name: api, path: bin/api, retention: 7d }
Field Notes
name Required
path Required; a glob or list of globs
when success (default), failure, always
retention Duration; capped by plan (Free 7 days, Team 30, Business 180)
if_no_files warn, error, ignore

Each artifact is stored with its SHA-256, and a SLSA provenance attestation is emitted for it. See Supply chain.

Sidecar containers for a job, such as a database for integration tests. They are reachable by their service name.

services:
postgres:
image: postgres:17
env: { POSTGRES_PASSWORD: pw }
ports: ["5432"]
health: { cmd: pg_isready, interval: 2s, retries: 30 }

The job’s steps do not start until each service’s health check passes. Up to 20 services per job.

JUnit, XUnit and TAP reports are ingested and shown per job, with failing cases and timings. Coverage reports in Cobertura and LCOV are supported. Playwright traces can be attached as artifacts.

Emit annotations from any step:

::error file=src/main.go,line=42::nil pointer dereference
::warning file=README.md,line=3::broken link
::notice::deployed in 41s