CI

A fresh Google Cloud for every job.

The CloudBurrow GitHub Action starts a kind cluster, exports the SDK environment for every later step, and deletes the cluster when the job ends. Plain shell works on any other runner with Docker.

The workflow

From docs/ci.md at 82a2eb9, verbatim. Pin the action by commit SHA.

.github/workflows/test.ymlYAML
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

      # kind and kubectl. Docker is already on GitHub's Ubuntu runners.
      - uses: helm/kind-action@06c1ae10762d3b9c1644e7fe69596ae519e015a2 # v1.15.0
        with:
          install_only: true
          version: v0.33.0
      - name: Install kubectl
        run: |
          curl -fsSLo kubectl "https://dl.k8s.io/release/v1.36.4/bin/linux/amd64/kubectl"
          chmod +x kubectl && sudo mv kubectl /usr/local/bin/

      # Pin the action by commit SHA, as for any third-party action.
      - uses: cloudburrow/cloudburrow@<commit-sha>
        with:
          version: v0.1.0            # or latest, or source (needs actions/setup-go)
          services: storage,pubsub   # default: CloudBurrow's defaults

      # STORAGE_EMULATOR_HOST, PUBSUB_EMULATOR_HOST, GOOGLE_CLOUD_PROJECT and the
      # rest of `cloudburrow env` are now set for every later step.
      - run: go test ./...

The action installs CloudBurrow and verifies the archive, checks for Docker, kind and kubectl, runs cloudburrow up, and appends cloudburrow env to $GITHUB_ENV, so every later step reaches the local services with no change to test code.

Inputs

InputDefaultWhat it does
version latest Release tag to install (such as v0.1.0), latest, or source to build the repository the action was checked out from, which needs Go. Any release from v0.1.0 on works: the action passes only the flags the installed CLI has (docs/ci.md lists them).
services empty Comma-separated services to start. Empty starts CloudBurrow's defaults.
mode ephemeral State mode: ephemeral or persistent.
name empty Instance name. Empty means ci-<run id>-<job id>, so jobs never share one, even on a single self-hosted runner.
timeout 10m How long to wait for the instance to become ready.

Generated from the action's action.yml. It also takes port-base and github-token; see docs/ci.md.

Afterwards, always

The cluster is deleted when the job ends, whether or not it passed.

A CI job with CloudBurrow One job lane: checkout, then cloudburrow/cloudburrow@<sha> (up), then your tests, then diagnose on failure, then cluster deleted (always). job checkout cloudburrow/cloudburrow@<sha> up your tests diagnose on failure cluster deleted always

To keep diagnostics from a failed run, write cloudburrow diagnose's redacted bundle in a step that runs only on failure. Keeping logs from a failed run

Other runners

Plain shell works on any runner with Docker, kind and kubectl.

ci.shShell
set -eu
# Install, verifying the checksum (and the attestation when gh is present).
curl -fsSL https://raw.githubusercontent.com/cloudburrow/cloudburrow/main/scripts/install.sh | sh -s -- --prefix "$HOME/.local"
export PATH="$HOME/.local/bin:$PATH"

NAME="ci-${CI_JOB_ID:-$$}"
FLAGS="--name $NAME --mode ephemeral --services storage,pubsub"

# Delete the cluster however the script exits.
trap 'cloudburrow delete $FLAGS' EXIT

cloudburrow up --detach $FLAGS        # exits 0 only once ready; 1 failed, 2 timed out
cloudburrow wait --timeout 1m $FLAGS
eval "$(cloudburrow env $FLAGS)"

go test ./...

Any runner, in shell, in docs/ci.md

How CloudBurrow tests itself

On every merge, an acceptance workflow uploads an object, publishes an event, has a Cloud Run worker read it and write a result, and reads the result back, every step through an official SDK. Go, Python and Node.js suites run against a live instance.

The acceptance flow Five steps, each through an official SDK: Upload an object, then Notification to Pub/Sub, then Cloud Run worker reads it, then Writes a result, then Result read back. Step 1 Upload an object official SDK Step 2 Notification toPub/Sub official SDK Step 3 Cloud Run workerreads it official SDK Step 4 Writes a result official SDK Step 5 Result read back official SDK

The short answer, in docs/status.md

Build against Google Cloud APIs, locally

Free and open source under Apache-2.0. No account, no sign-up, no Google Cloud bill.

Get started