Skip to content

test(node-checkout-and-setup): stop requiring the fixture branch to match test-fixture - #49

Open
joshuafernandes wants to merge 1 commit into
mainfrom
fix/decouple-fixture-branch
Open

joshuafernandes wants to merge 1 commit into
mainfrom
fix/decouple-fixture-branch

Conversation

@joshuafernandes

Copy link
Copy Markdown
Contributor

Closes #46.

The node-checkout-and-setup tests needed test-fixtures/node-checkout-and-setup to match node-checkout-and-setup/test-fixture/ exactly, so any change to the fixture broke CI on main and on every pull request until someone republished the branch by hand.

Only two places needed them to match: the "Fixture branch is up to date" job, and the step that compares downloaded files with test-fixture/. Every other job that uses the branch only needs a Yarn workspace at the root of a ref, and the branch is one on its own.

Changes

  • Removes the "Fixture branch is up to date" job.
  • "download-metadata.sh downloads from public and private sources" compares with the branch's own files. It fetches the branch and extracts its .nvmrc, package.json and yarn.lock instead of reading test-fixture/. It still checks that both download paths (the public raw URL and the authenticated API) return the right bytes.
  • publish-fixture.sh, the workflow's env comment and the README say the branch is used as it is: republishing is optional, from main, when the tests should use a newer fixture, and never from a pull request's branch.

This covers all three failure modes in #46: Renovate (already ignored since #45), a manual edit that isn't republished, and a pull request that changes the fixture. It needs no write token or ruleset change, and works for pull requests from forks.

Trade-off: the branch can lag behind test-fixture/. The tests that use it only need a valid workspace, and the jobs that use test-fixture/ directly (prepare-workspace.sh, compute-cache-paths.sh) still test the committed fixture.

Testing

  • Ran the new comparison locally against the current branch (2eaedf4): .nvmrc, package.json and yarn.lock match through both the public raw URL and the authenticated API.
  • The workflow parses as YAML and publish-fixture.sh passes bash -n.

Conflict with #47

#47 deletes this README's Tests section. Whichever merges second has a one-paragraph conflict, resolved by keeping #47's deletion.

…atch test-fixture

The tests that need a ref with a Yarn workspace at its root now use the
test-fixtures/node-checkout-and-setup branch as it is. The download test
compares with the branch's own files instead of test-fixture/, and the
fixture-branch-up-to-date job is removed. Changing test-fixture/ by hand,
in a pull request or by Renovate no longer breaks CI until the branch is
republished.

Closes #46
@joshuafernandes
joshuafernandes requested review from a team as code owners December 3, 2026 01:32

This branch has not been deployed

No deployments
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.

node-checkout-and-setup: test fixture branch must be republished by hand

1 participant