Skip to content

ci: gate test jobs by changed domain - #181

Merged
spizeck merged 1 commit into
masterfrom
chore/change-aware-ci
Sep 28, 2026
Merged

spizeck merged 1 commit into
masterfrom
chore/change-aware-ci

Conversation

@spizeck

@spizeck spizeck commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Makes Website tests change-aware. A new Detect changes job diffs the PR against master, classifies changed paths into app and perf domains, and gates Critical website tests and Performance budgets with a job-level if:. Pushes to master and manual dispatch still run both.

Previously a docs-only PR booted two Playwright-container jobs — npm ci, coverage run, test build, full E2E suite, and the performance baseline.

Check safety

Gating uses job-level if:, not workflow paths: filters: a skipped job reports Success and satisfies required checks, whereas a filtered workflow would leave them pending forever. The classifier fails safe: uncomputable diff or unrecognized path → run everything. Cheap JSON/YAML validation runs inside Detect changes. patches/** (patch-package) always runs everything.

Expected behavior

Change Critical website tests Performance budgets
*.md, .github/**, vercel.json, .vscode/** skip skip
app/**, components/**, lib/**, public/**, next.config.* run run
tests/**, playwright.config.ts, eslint*, vitest.config.mts, scripts/** run skip
perf/**, scripts/perf-*, scripts/build-test.mjs run run
patches/** (postinstall patches) run run
package.json / package-lock.json / .nvmrc run run
unknown/unmatched file run run
push to master run run

production-smoke.yml is untouched — it is deployment/schedule-triggered, not per-PR.

Validation

Classifier logic exercised locally against simulated diffs. Workflow YAML validated.

Generated with Devin

Summary by Sourcery

Make website CI change-aware by selectively running critical and performance checks while retaining fail-safe full coverage for broad or uncertain changes.

New Features:

  • Add change-aware classification for website test domains based on modified files.
  • Run full website validation for master pushes, manual dispatches, dependency changes, patches, and unrecognized or uncomputable changes.

Enhancements:

  • Gate critical website tests and performance budgets independently with job-level conditions while preserving required-check success for skipped jobs.
  • Add lightweight JSON and workflow YAML validation during change detection.

CI:

  • Introduce a fail-safe Detect changes job that identifies whether application and performance domains may be affected by a pull request.

@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
seasaba-web Ready Ready Preview Sep 28, 2026 12:25am UTC

Request Review

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @spizeck, this account has used its review budget of 1,500,000 diff characters for the last 7 days.

You can request another review in 22 hours and 44 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Sep 28, 2026

Copy link
Copy Markdown

Reviewer's Guide

Introduces a fail-safe Detect changes job in the website test workflow that validates and classifies changed files into app and performance domains, then gates the corresponding Playwright jobs with job-level conditions while retaining full runs for master pushes, manual dispatches, and uncertain changes.

File-Level Changes

Change Details Files
Added a fail-safe change classifier that determines whether application and performance domains are affected.
  • Checks out full history and computes the PR diff against the base branch.
  • Classifies paths into app/perf domains, with docs-only exclusions and full-run fallbacks for unknown files, dependency changes, patches, non-PR events, or diff failures.
  • Validates changed JSON files and, when available, changed workflow YAML files before publishing job outputs.
.github/workflows/tests.yml
Gated the expensive website test jobs using the classifier outputs while preserving required-check behavior.
  • Added a dependency on the Detect changes job.
  • Uses job-level conditions to independently skip Critical website tests and Performance budgets.
  • Keeps pushes to master and manual dispatch on the full test path.
.github/workflows/tests.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@spizeck
spizeck merged commit 80ef705 into master Sep 28, 2026
10 checks passed
@spizeck
spizeck deleted the chore/change-aware-ci branch September 28, 2026 00:26

This branch was successfully deployed

1 active deployment
Preview — 0d062c9b Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant