Skip to main content
Automate policy testing and deployment with GitHub Actions. The TealTiger Playground ships with two pre-configured workflows — one for CI and one for CD — plus a built-in workflow generator for custom pipelines.
All workflows run within the GitHub Actions free tier (2,000 minutes/month). Estimated usage per CI run: ~2 minutes.

Overview

Both pre-built workflows trigger only when files under playground/ change.

1. GitHub Actions Setup

Required Secrets

Navigate to Settings → Secrets and variables → Actions and add:

2. CI Workflow — Automated Testing

File: .github/workflows/playground-ci.yml The CI workflow runs on every push to main and on pull requests that touch playground files.

Jobs

  1. Lint & Type Check — TypeScript compilation and ESLint
  2. Unit & Property-Based Tests — Vitest with fast-check and coverage
  3. E2E Tests — Playwright against the built output
  4. PR Comment — Summary table with results from all test jobs

PR Comment Example

Blocking PRs on Failure

Enable branch protection rules: Settings → Branches → Add rule for main → Enable Require status checks to pass before merging → Select the three CI jobs.

3. CD Workflow — Automated Deployment

File: .github/workflows/playground-deploy.yml Triggers on pushes to main when playground files change. Jobs:
  1. Deploy to Vercel — builds and deploys to production
  2. Smoke Tests — health check, content verification, static asset check
  3. Deployment Status — sets commit status on GitHub

4. Generating Custom Workflows

The generated workflow includes policy syntax validation, test suite execution, property-based tests, coverage reporting, PR comments, and optional auto-deploy.

5. Free Tier Budget Management

Tips to stay within limits:
  • Path filters skip unrelated commits
  • Concurrency controls cancel in-progress runs
  • npm and Playwright browser caching between runs
  • Timeout limits prevent runaway builds

6. Troubleshooting