Skip to content

ci: wire npm run test:unit into CI - #116

Closed
mrbobbytables wants to merge 2 commits into
cncf:mainfrom
mrbobbytables:quality/issue-66-test-ci-1786208677
Closed

mrbobbytables wants to merge 2 commits into
cncf:mainfrom
mrbobbytables:quality/issue-66-test-ci-1786208677

Conversation

@mrbobbytables

Copy link
Copy Markdown
Member

What

Adds .github/workflows/test.yml, a pull_request (and push-to-main) triggered workflow that runs npm ci + npm run test:unit, plus a cheap node --check syntax gate over all scripts/**/*.mjs files.

Why

Closes #66. The only existing validation gate was deploy-gh-pages.yml, which runs on push to main — i.e. after merge. That's how #37 merged green with a syntactically broken scripts/validate-awards.mjs: the pre-merge checks never ran the test suite, and the breakage was only caught when the deploy workflow failed on main (run 31236173766).

Notes

  • Uses the pinned actions/checkout SHA already established in pdf.yml for consistency with existing security-conscious pinning in this repo.
  • Verified locally: npm run test:unit passes (53/53), and node --check passes on all 9 .mjs files under scripts/.

Verification

  • npm run test:unit → 53 passed, 0 failed
  • node --check on all scripts/**/*.mjs files → clean

Checklist

  • Content speaks to end users (see CONTRIBUTING.md)
  • Commits are DCO-signed
  • Site builds without new warnings

Wire npm run test:unit into CI so PRs are validated before merge.
Previously the only gate was deploy-gh-pages.yml, which runs on
push to main after merge -- this allowed PR cncf#37 to merge with a
syntactically broken scripts/validate-awards.mjs, only caught when
the deploy workflow failed on main.

Adds a pull_request + push-to-main triggered workflow that runs
npm run test:unit, plus a node --check syntax gate over all
scripts/**/*.mjs files as a cheap pre-test sanity check.

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

@hivecommons-hive hivecommons-hive Bot 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.

Approved by @castrojo for Hive auto-merge on green CI.

@castrojo

Copy link
Copy Markdown
Member

Automated triage update: the branch is now current with main. DCO reports ACTION_REQUIRED, and the new workflow exposes only the unit check—not the repository-required Validate repository gate. Please resolve the sign-off, pin actions/setup-node to an immutable SHA, and provide the required validation check before landing.

@castrojo

Copy link
Copy Markdown
Member

Automated triage: closing as superseded by #175. The replacement is based on current main, uses signed-off commits and immutable action pins, exposes the required Validate repository check, and runs the 55-test unit suite plus the production subpath build. Its DCO and repository validation checks are green.

@castrojo castrojo closed this Sep 16, 2026
mrbobbytables added a commit to mrbobbytables/endusers that referenced this pull request Sep 21, 2026
…policy (cncf#206)

Fleet strategist sweeps have repeatedly found duplicate PRs opening the
same fix from different agents (issue cncf#119). All previously-flagged
duplicate pairs in this repo (cncf#43/cncf#112, cncf#56/cncf#114, cncf#103/cncf#116) are already
closed or merged, so the remaining actionable item is codifying the
convention: search existing open/closed PRs before implementing a fix,
link or supersede duplicates instead of opening parallel PRs, and
reference existing tracking issues for workflow-file fixes instead of
opening new artifact-patch PRs.

Closes cncf#119

Signed-off-by: copilot-swe-agent <223556219+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm Approved by a Hive merger/owner for auto-merge on green CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[quality] wire npm run test:unit into CI — PR #37 merged with a broken validator

2 participants