Skip to content

ci: add PR test workflow for Discord toolkit + worker - #9

Merged
rz1989s merged 1 commit into
mainfrom
chore/add-pr-ci
Sep 23, 2026
Merged

rz1989s merged 1 commit into
mainfrom
chore/add-pr-ci

Conversation

@rz1989s

@rz1989s rz1989s commented Jun 19, 2026

Copy link
Copy Markdown
Member

What

Adds a CI workflow that runs the test suites for both npm packages in this repo on every PR and push to main:

  • /discord — the Discord infra-as-code toolkit (40 tests)
  • /discord/worker — the interactions Cloudflare Worker (33 tests)

Matrix job: npm ci && npm test (node --test) per package, with npm caching scoped to each lockfile.

Why

Per the org Dependabot audit (sip-protocol/sip-protocol#1186), this repo had no PR CI — Dependabot npm bumps in /discord and /discord/worker were landing unverified. This makes them verifiable.

Drive-by fix

The toolkit's test script was a bare node --test, which recursed into discord/worker/test/ — those tests need the worker's own dependencies (discord-interactions) and fail when run from the toolkit package (which doesn't install them). Scoped it to node --test test/*.test.js so npm test is correct both locally and in CI. The worker's own script is unchanged (it runs correctly from its own package).

Verification

Ran locally exactly as CI does:

  • discord: npm ci && npm test → 40 passed, 0 failed
  • discord/worker: npm ci && npm test → 33 passed, 0 failed

Refs sip-protocol/sip-protocol#1186

Neither package had PR CI, so Dependabot npm bumps in /discord and
/discord/worker landed unverified. Add a matrix workflow that runs
npm ci && npm test (node --test) for each package on PRs and pushes
to main.

Also scope the toolkit's test script to test/*.test.js — the bare
node --test recursed into discord/worker/test, whose tests need the
worker's own dependencies and failed when run from the toolkit package.

Refs sip-protocol/sip-protocol#1186
@rz1989s
rz1989s merged commit a794ac2 into main Sep 23, 2026
2 checks passed
@rz1989s
rz1989s deleted the chore/add-pr-ci branch September 23, 2026 22:58
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