Examples

GitHub Actions PR gate

Block merge on failure.

Overview

This workflow installs the Zof CLI in GitHub Actions, runs a staging smoke suite on every pull request, and fails the job when validation does not pass, blocking merge until reliability criteria are met.

Replace ZOF_PROJECT_ID and suite name with values from Operate → Projects and Quality → Test suites. Never commit API keys; use repository secrets.

Who should read this

  • QA engineers, SREs, platform teams, and developers operating Zof Console and APIs.

Prerequisites

  • Organization API key or authenticated CLI
  • Staging environment for safe experimentation

When to use this workflow

  • Onboarding new team members to Zof terminology and workflows
  • Authoring internal runbooks aligned with Console labels
  • Designing CI/CD or webhook integrations against documented behavior

Step-by-step procedure

Create repository secrets

GitHub → Settings → Secrets → ZOF_API_KEY from Admin Center API keys.

ZOF_PROJECT_ID from Console project settings.

Add workflow file

Copy .github/workflows/zof-pr-gate.yml from this example.

Adjust --env and --suite to match staging names.

Enforce branch protection

Require the Zof PR Gate check before merge to main.

Document override process for hotfixes in team runbook.

Key concepts

Expected success
Job exits 0; run status passed in Console Operate → Runs.
Expected failure
Job exits non-zero; PR blocked; reviewers inspect run URL from Actions logs.

Best practices

  • Validate changes in staging before applying release gates to production.
  • Include run IDs and timestamps when escalating issues to support or auditors.
  • Align internal runbook terminology with Zof Console UI labels for clarity.

Common issues

Authentication failure
Invalid or expired ZOF_API_KEY; CLI exit code 2.
Queued run timeout
Agent capacity saturated; increase fleet or stagger suites.
Wrong environment
Suite targets URLs not reachable from cloud agents; use endpoint agents for private staging.

Example implementation

# .github/workflows/zof-pr-gate.yml
# Replace pr-smoke with your suite ID from Quality → Test suites
name: Zof PR Gate
on:
  pull_request:
    branches: [main]
jobs:
  validate:
    runs-on: ubuntu-latest
    timeout-minutes: 30
    steps:
      - uses: actions/checkout@v4
      - run: npm install -g @zof-ai/cli
      - name: Staging validation
        run: zof run --wait --env staging --suite pr-smoke
        env:
          ZOF_API_KEY: ${{ secrets.ZOF_API_KEY }}
          ZOF_PROJECT_ID: ${{ secrets.ZOF_PROJECT_ID }}
# Success: exit 0, run status passed
# Failure: exit non-zero, merge blocked when branch protection requires this check

Was this page helpful?

01The operational surface

One surface for posture, operations, and what needs attention next.

The Zof home is not a marketing dashboard. It is the operational surface engineering, QA, and SRE teams use every day, quality posture, in-flight runs, coverage by module, and the actions a leader should look at next.

OPERATIONAL KPIs

  • Runs
  • Coverage
  • Risk

Live across every environment you ship to.

WORK SPINE

  • Specs
  • Tests
  • Schedules

From specification to scheduled regression.

GUARDRAILS

  • RBAC
  • SSO
  • audit

Every action attributable to a named human.

STAGING · LIVE/home
Zof AI home command center showing 12 runs at 94% pass, 3 open critical issues, 84% coverage, four module traceability bars, the specification pipeline, upcoming schedules, and recommended next actions with an active-runs sidebar.
Home view · Checkout Service · Staging · captured live from the product.
  • 01 · RUNS · 24H

    94% pass

    12 runs across staging

  • 02 · COVERAGE

    84%

    Across four modules

  • 03 · ACTIVE RUNS

    3 running

    Live on this branch

  • 04 · NEXT ACTIONS

    Recommended

    Triage gaps, new spec

GitHub Actions PR gate | Zof AI Documentation