Skip to content

perf(ci): cache playwright/apt, draft-gate expensive jobs, consolidate sub-minute jobs - #904

Merged
sabbour merged 1 commit into
devfrom
perf/ci-caching-and-job-consolidation
Aug 25, 2026
Merged

perf(ci): cache playwright/apt, draft-gate expensive jobs, consolidate sub-minute jobs#904
sabbour merged 1 commit into
devfrom
perf/ci-caching-and-job-consolidation

Conversation

@sabbour

@sabbour sabbour commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Three CI perf improvements

1. Cache Playwright browsers and bubblewrap

  • node-toolchain-tests: cache ~/.cache/ms-playwright keyed on scripts/ui-harness/package-lock.json; only run full playwright install --with-deps on cache miss, otherwise just install-deps for system libs.
  • dotnet-tests: cache the /usr/bin/bwrap binary; skip apt-get install on cache hits.

2. Draft-gate expensive jobs

  • Added github.event.pull_request.draft == false to dotnet-tests, web-tests, node-toolchain-tests, docs-build. Skipped jobs report skipped to GitHub, which required-status-check rulesets treat as passing, so draft PRs (e.g. upper frames of a stacked PR) no longer burn full CI while blocked on a lower frame merging.
  • changes, its consolidated changeset-advisory/diagram steps, and architecture-diagrams were intentionally left ungated since they're lightweight and give fast feedback even in draft.

3. Consolidate sub-minute jobs

  • Removed the web-lint echo job entirely (it only echoed a confirmation; lint already runs inside web-tests).
  • Merged changeset-advisory and diagrams-in-sync (architecture-diagram check) into the changes job as extra conditional steps, since all three were sub-minute jobs each paying a full runner startup + GitHub Actions' 1-minute billing floor for <20s of real work.
  • changes checkout now uses fetch-depth: 0 (needed by the changeset advisory diff against the PR base ref).

⚠️ Ruleset follow-up needed

Both rulesets reference job names as required status checks:

  • dev-integration-ruleset requires: .NET tests, Node toolchain tests, Web tests, Docs build, Changeset advisory
  • main-ruleset requires: .NET tests, Node toolchain tests, Web tests, Docs build

Since Changeset advisory is no longer a separate job/check (it's now a step inside Detect changed paths), dev-integration-ruleset will need to be updated to drop Changeset advisory from its required checks list (or point at a new check name), or PRs into dev will show that required check as permanently missing. I did not modify the ruleset via API per instructions — flagging here for @sabbour to update manually.

main-ruleset is unaffected (it doesn't reference Changeset advisory, Architecture diagrams are in sync, or Web lint).

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

@sabbour
sabbour force-pushed the perf/ci-caching-and-job-consolidation branch from 6006c99 to 391553b Compare August 25, 2026 12:38
@sabbour
sabbour changed the base branch from dev to perf/docs-drift-and-publish-images-scoping August 25, 2026 12:38
@sabbour
sabbour force-pushed the perf/ci-caching-and-job-consolidation branch 2 times, most recently from b355e26 to ea6d18d Compare August 25, 2026 12:40
@sabbour
sabbour force-pushed the perf/ci-caching-and-job-consolidation branch from ea6d18d to d3974d5 Compare August 25, 2026 14:34
@sabbour
sabbour force-pushed the perf/ci-caching-and-job-consolidation branch from d3974d5 to 7287856 Compare August 25, 2026 14:48
@sabbour
sabbour force-pushed the perf/ci-caching-and-job-consolidation branch from 7287856 to d5fecb0 Compare August 25, 2026 15:30
Base automatically changed from perf/docs-drift-and-publish-images-scoping to dev August 25, 2026 15:40
…-lint and diagrams-in-sync

- Cache ~/.cache/ms-playwright keyed on ui-harness/package-lock.json
- Cache bubblewrap binary to skip apt-get on hits
- Add draft-gate (if: !draft) to dotnet-tests, web-tests, node-toolchain-tests, docs-build
- Remove the redundant Web lint echo job and the diagrams-in-sync job
- changeset-advisory remains a standalone job unchanged from dev

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 11857092-1327-41bd-8708-b2ca85e674dd
@sabbour
sabbour force-pushed the perf/ci-caching-and-job-consolidation branch from d5fecb0 to 3caff2c Compare August 25, 2026 15:40
@sabbour
sabbour merged commit 0cc6ff3 into dev Aug 25, 2026
13 checks passed
@sabbour
sabbour deleted the perf/ci-caching-and-job-consolidation branch August 25, 2026 15:54
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.

2 participants