Skip to content

ci: put the test and guard workflows on main - #126

Closed
rousso wants to merge 2 commits into
mainfrom
hotfix/ci-guards
Closed

rousso wants to merge 2 commits into
mainfrom
hotfix/ci-guards

Conversation

@rousso

@rousso rousso commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

The same two workflows as #123, which targets develop. They are needed on main as well, and the reason is not symmetry.

Why main needs them too

A hotfix is cut from main. When a hotfix pull request is opened, GitHub builds the merge commit from the hotfix branch and main — so if the workflows live only on develop, neither side has them, neither check ever runs, and with the checks required the hotfix cannot merge. To fix that you would have to switch protection off, at exactly the moment you are trying to ship an urgent fix.

Putting them on main now means every branch cut from it carries them.

What they are

  • tests — npm ci then npm test, Node 20, on every pull request and on pushes to main and develop.
  • guard main — fails when a pull request into main comes from a branch that is neither release/* nor hotfix/*, with an error saying to go through develop and a release instead.

Neither is path-filtered: a required check that only runs sometimes cannot be satisfied the rest of the time.

Checked

  • main passes its own suite: 290 tests.
  • The guard was proven on both paths before this: it failed a pull request from test/guard-should-block and passed one from release/guard-test. Both were closed unmerged.
  • This pull request comes from hotfix/*, so the guard should pass on it.

rousso added 2 commits August 22, 2026 13:28
The repository has a test suite and no check running it, so a pull
request could merge with it failing.
@rousso rousso closed this Aug 22, 2026
@rousso
rousso deleted the hotfix/ci-guards branch August 22, 2026 11:36
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