ci: install worker deps before discord unit tests - #26
Merged
Merged
Conversation
The Unit tests step runs node --test from discord/, which discovers worker/test/ too. handlers.test.js imports the worker's discord-interactions dependency, so without an install step the file fails to load and the weekly run has been red since the worker tests landed. Local run with this change: 73/73 pass.
Member
Author
|
Validated end-to-end via workflow_dispatch on this branch: run 35809018437 — all steps green. |
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.
Root cause
discord-drift has been red on every scheduled run since the worker tests landed (Sep 7, 14, 21 — e.g. run 35596151629). The failure is not Discord drift:
The
Unit testsstep runsnode --testfromdiscord/, which also discoversworker/test/.handlers.test.jsimports../src/index.js, which needs the worker'sdiscord-interactionsdependency — but the workflow never installs it, so the file dies at load and the job exits 1. TheAlert mod-log on driftstep then posts a misleading "drift detected" message to the mod log every week.Fix
Add
npm ciindiscord/workerbefore the unit tests. Nothing else changes.Validation
Note: once this merges, the next scheduled run (Mondays 06:00 UTC) exercises the real drift check (verify.js + secrets). If that fails, it's genuine drift — the alert step finally means what it says.