Skip to content

ci(maintenance): add aggregate unit-test check for branch protection - #5567

Merged
svozza merged 2 commits into
mainfrom
chore/required-status-checks
Aug 19, 2026
Merged

svozza merged 2 commits into
mainfrom
chore/required-status-checks

Conversation

@svozza

@svozza svozza commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Unit tests and dependency-review don't gate merges on main today, so a pull request can merge with failing tests. This adds a single aggregate context that branch protection can require, and makes sure it always reports.

Requiring the 30 individual code-quality matrix contexts instead would be brittle: adding a Node.js version or a workspace silently changes which checks are required.

Changes

  • Add a unit-tests-complete job to reusable-run-linting-check-and-unit-tests.yml that needs all five existing jobs and fails if any of them did not succeed
  • Treat skipped as a failure alongside failure and cancelled, and run the job with if: always(). Both are load-bearing: a skipped job reports its check run as skipped, and GitHub counts a skipped required check as satisfied, so an aggregate job that skipped when a dependency failed would green-light a broken pull request
  • Add reopened to pr-run-linting-check-and-unit-tests.yml triggers, so a reopened pull request re-reports instead of stranding the required context

dependency-review.yml needs no change: it triggers on bare pull_request and has no paths: filter, so it always reports.

Follow-up for a repo admin once this merges: add run-unit-tests / unit-tests-complete and dependency-review to the required status checks for main. A context must report at least once before it can be required, which is why this is a separate step.

Issue number: closes #5569


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

…ned PRs

The unit test workflow fans out to 30 jobs, so requiring each context
individually is brittle: adding a Node.js version or a workspace silently
changes which checks are required. `unit-tests-complete` gives branch
protection one stable context to require instead.

`if: always()` plus the explicit result check is deliberate. A skipped job
reports its check run as `skipped`, and GitHub counts a skipped required
check as satisfied, so an aggregate job that skipped on failure would
green-light a broken PR.

Adding `reopened` keeps that context from being stranded: without it a
reopened PR never re-reports.

@dreamorosi dreamorosi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good idea - never thought of this

@svozza
svozza merged commit fc979f0 into main Aug 19, 2026
39 checks passed
@svozza
svozza deleted the chore/required-status-checks branch August 19, 2026 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S PR between 10-29 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maintenance: unit tests and dependency review do not gate merges on main

2 participants