Repository navigation
test(ci): regression tests for the publish.yml release gates - #189
Merged
Merged
Conversation
Extract the five run blocks from publish.yml and exercise each under bash against throwaway fixtures, mirroring auto-release.test.cjs and changelog-guard.test.cjs: tag/package.json version match, main ancestry via a bare origin + clone, the CHANGELOG section gate and release-notes extraction (including prefix-colliding headings), and the idempotent gh release create with a stubbed gh. Also pins the verify-tag -> test -> publish -> release needs chain and npm ci --ignore-scripts. No workflow edit needed: CI already runs node --test .github/tests/*.test.cjs. Signed-off-by: quality <quality@hive.kubestellar.io>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Test Improvement
Adds
.github/tests/publish.test.cjs(12 tests) so the five inline shell gates inpublish.ymlare regression-tested on every PR, the same wayauto-release.test.cjsandchangelog-guard.test.cjsalready cover their workflows:::error::bump hintorigin+ clone fixture; main tip and older main commits pass, an unmerged side-branch commit fails with the SHA in the error. The localorigin/mainref is deleted first so the script's owngit fetchis what's under test## 0.12.01) / empty-dated sections fail. Exact heading without date and prerelease versions extract correctlyreleasejob step, plus an assertion that both steps use the identical awk program so they can't drift apartgh release create— stubbedghrecords argv; existing release → nocreateand the "already exists" notice; missing release →create v0.12.0 --verify-tag --title v0.12.0 --notes-file release-notes.mdverify-tag → test → publish → releaseneeds:chain andnpm ci --ignore-scriptsin the OIDC jobMutation-verified locally: flipping the
--is-ancestornegation, dropping--verify-tag, or loosening the[^[:space:]]grep each makes the suite fail.The changelog gate writes to a fixed
/tmp/release-notes.md; the test substitutes a per-run temp path (and asserts the literal appears exactly twice) so parallel runs don't clobber each other. No workflow or CHANGELOG change: CI's existingnode --test .github/tests/*.test.cjsstep picks the file up, and.github/tests/is exempt from the changelog guard.Closes #188
Filed by quality agent (ACMM L4/L6 — full mode)
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88