Works with Any CI
# Run drift check in CI mode
npx ahoybuoy drift check
# Exit codes:
# 0 = No critical drift
# 1 = Critical drift found (blocks merge)
# 2 = Error running scan GitHub Actions
npx ahoybuoy drift check GitLab CI
npx ahoybuoy drift check --format json CircleCI
npx ahoybuoy drift check --fail-on warning Jenkins
npx ahoybuoy drift check Azure Pipelines
npx ahoybuoy drift check Bitbucket Pipelines
npx ahoybuoy drift check Output Formats
CLI (default)
Human-readable output for terminal
--format cli JSON
Machine-readable for custom integrations
--format json JUnit XML
For CI systems that parse JUnit reports
--format junit SARIF
For GitHub Code Scanning
--format sarif Failure Thresholds
# Fail on any critical issues (recommended)
npx ahoybuoy drift check --fail-on critical
# Fail on warnings too (stricter)
npx ahoybuoy drift check --fail-on warning
# Never fail, just report (audit mode)
npx ahoybuoy drift check --fail-on none
# Custom thresholds
npx ahoybuoy drift check \
--max-critical 0 \
--max-warning 10 \
--max-info 50 Health Score Gate
Set a minimum health score in your config. No CLI flags needed — buoy drift check exits with code 1 when the score drops below your threshold.
# Config-based gate — no flags required
health:
failBelow: 70 # Exit code 1 if health score < 70 Config gate vs CLI flags
Lives in .buoy.yaml. Enforced automatically. Same threshold everywhere — local, CI, every developer.
Per-invocation. Threshold based on severity counts. Use alongside the health gate for layered CI gating.
Full GitHub Actions Example
name: Design Drift Check
on:
pull_request:
branches: [main]
jobs:
drift-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install dependencies
run: npm ci
- name: Run Buoy drift check
run: npx ahoybuoy drift check --fail-on critical
# Also respects health.failBelow from .buoy.yaml
- name: Upload SARIF (optional)
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: buoy-results.sarif Setting up CI? Get the PR review cheat sheet.
What to look for in design system PRs. A quick reference for your team's code reviews.
No spam. Unsubscribe anytime.