Code & deployment quality

The hosted site is a static snapshot. Every merge to main must pass the same CI job that validates scenarios, runs the examples, caches Results logs, and builds the app — then GitHub Pages may deploy.

CI/CD pipeline

One workflow — .github/workflows/ci.yml — runs on pull requests and on pushes to main and cursor/**. The deploy job is extra and only exists after a green test-and-build on main.

  1. Install the same tools the examples need

    Ubuntu + Node 24 + Python 3.12, then npm install, Playwright Chromium, the k6 binary, and pytest + httpx + pytest-bdd.

  2. Validate every scenario

    npm run validate:scenarios checks each scenario.json for id, title, category, at least two framework variants, and files that exist on disk.

  3. Run unit, HTTP, UX, performance, and security tests

    npm test is the same command you run locally. A single red example fails the job.

  4. Capture Results panel logs

    npm run capture:results re-runs each documented variant and writes stdout / stderr JSON under apps/web/public/results/. Missing output fails the upload.

  5. Build the static site

    npm run build. On main this sets GITHUB_PAGES=1 so asset URLs match jmaret.github.io/TestingRosettaStone.

  6. Deploy only from a green main build

    The deploy job needs test-and-build, runs only on push to main, and publishes the Pages artifact. A failing test never ships.

Quality gates

Each gate is a hard fail. There is no “deploy anyway” path from this workflow.

  • Schema
    Scenario catalog is complete

    Broken ids, missing variants, or dangling file paths stop CI before tests run.

  • Tests
    Examples stay green

    Vitest, Jest, node:test, pytest, Cucumber.js, pytest-bdd, SuperTest, Playwright, httpx, Cypress, k6, Artillery, and Autocannon all run in one job.

  • Results
    Scenario pages show real output

    The site has no live runner API. Visitors see the last CI-captured log beside the writeup.

  • Build
    Astro must produce apps/web/dist

    A broken page or import fails the job the same way a red test does.

  • Deploy
    Pages publishes the artifact from that job

    Repo Pages source is GitHub Actions — not a branch folder that can skip tests.

What CI proves

Code quality

The Rosetta examples are the product. If a framework variant cannot run, the catalog is wrong — so CI treats that as a release blocker, not a docs footnote.

Cached logs keep the hosted Results panel honest: what you read on a scenario page came from the same commands in .github/workflows/ci.yml.

What CI withholds

Deployment quality

Pull requests and cursor/** branches get the full test + build job. They do not deploy. Only a successful push to main uploads the Pages artifact.

License scanning and link checks are still planned. Until then, the live bar is: validate → test → capture → build → deploy.

Same checks on your machine

You do not need Actions to reproduce a red job. From the repo root:

npm run validate:scenarios
npm test
npm run capture:results
npm run build

Setup steps (Playwright, k6, pytest) live on Run locally. Workflow YAML: ci.yml.