fix: fail CI when piped tests fail - #39
Merged
Merged
Conversation
Contributor
Author
|
Thanks for merging this fix. The upstream test and Docker checks both passed. I'd like to claim the bug-fix bounty from your ugig offer. SOL on Solana mainnet is suitable; the dedicated receiving address is:
Please confirm the award amount and share the transaction signature when sent. |
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.
The CI Test step currently reports success when Node tests fail. Its unspecified Linux shell uses
bash -e, soteesupplies the pipeline's successful status and the script reachesexit 0.Set
shell: bashon that step. GitHub Actions then invokes Bash with-eo pipefail, preserving a failing test runner's exit status while keepingoutput.txtand the existing missing-database check.Verified on Linux in a disposable Docker container with Node 24.20.0 and on macOS with Node 24.10.0, using the exact Test step script extracted from the workflow and GitHub's documented shell invocations:
no databaseAll eight runs per environment retained test output in
output.txt. The Linux container had no network, no credentials, read-only inputs and limited resources.git diff --checkpasses. This verifies shell behavior locally; the full application/database suite and hosted CI were not run locally for this one-line workflow change.Minimal failing-test fixture used in the workflow's
test/*.test.tspath:Running the existing Test step script with
bash -e step.shreturns 0 for that fixture. Withbash --noprofile --norc -eo pipefail step.sh, it returns 1. The other controls use a passing Node test, a Node test skipped with reasonno database, and a test file containing a syntax error.Reference: https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idstepsshell
Submitted for consideration under the bug-fix PR offer at https://ugig.net/gigs/8b2a21db-ce15-433f-a73d-68f2e3349e87 . If eligible, SOL is a suitable payout method; receiving details can be supplied privately. No payment is assumed until confirmed.