Skip to content

ci: run only what a pull request can affect - #332

Merged
HugoFara merged 2 commits into
developfrom
ci/faster-workflows
Nov 4, 2026
Merged

HugoFara merged 2 commits into
developfrom
ci/faster-workflows

Conversation

@HugoFara

@HugoFara HugoFara commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Every PR waited about 11 minutes. Nearly all of it was four Windows PHPUnit jobs: 9 minutes each, against 17 seconds on Ubuntu for the same 9,245 tests. Everything then ran a second time on merge into develop.

Changes

  • Windows on main only. PRs run PHPUnit on Ubuntu with all four PHP versions. A push to main adds Windows.
  • No more push runs on develop. PRs and main remain.
  • Path filters on PRs. Each workflow lists the paths that can affect it. Pushes to main have no filter, so it stays the full check before a release.
  • Superseded runs are cancelled. A new push to a PR replaces its running CI. Runs on main always finish.
  • Xdebug off in PHPUnit. The job runs test:no-coverage, so coverage: xdebug only slowed it down. This may also shrink the Windows time; the first run on main will show.

Docs: CONTRIBUTING.md and its copy no longer say the locale check runs everywhere, and CLAUDE.md explains the setup, including adding a path to a workflow when a new test reads a file outside its list.

Choosing the filters

Two are deliberately broad, so a cross-check can't be skipped by mistake:

  • PHP tests use all of src/** and locale/**, because guard tests such as PluralKeysExistTest scan TypeScript and locale files. tests/fixtures/** is shared with the frontend tests.
  • Frontend uses all of src/**, because the CSS purge step scans PHP views. cypress/** is included because eslint . lints it.

Psalm uses **.php because it scans the whole repo, not just src/.

Trade-offs

  • A Windows-only bug now surfaces on main, at release time.
  • Two PRs that pass separately but clash together are only caught at main.
  • No ruleset or branch protection requires specific checks, so skipped workflows can't block a merge. If required checks are added later, skipped ones would need handling.

Verification

This PR touches all five workflows, so it runs all of them: expect 10 checks and no Windows job. The filters themselves are confirmed by the next docs-only PR. All workflow files parse as YAML.

🤖 Generated with Claude Code

HugoFara and others added 2 commits November 4, 2026 12:38
Every pull request waited about 11 minutes, nearly all of it on four Windows
PHPUnit jobs taking about 9 minutes each against 17 seconds on Ubuntu, and
then ran everything a second time when merged into develop.

Pull requests now run on Ubuntu only, and each workflow runs only when its
paths changed. A push to main stays the full check, Windows included. The
develop push is gone, and a new push to a pull request cancels the run it
replaces.

PHPUnit also stops loading Xdebug: the job runs test:no-coverage, so it was
only slowing the tests down.

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@HugoFara
HugoFara merged commit 106bda4 into develop Nov 4, 2026
10 checks passed
@HugoFara
HugoFara deleted the ci/faster-workflows branch November 4, 2026 11:42
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