Skip to content

ci: a failing step fails the job - #24

Merged
christiangda merged 1 commit into
mainfrom
ci/a-failing-step-fails-the-job
Oct 18, 2026
Merged

christiangda merged 1 commit into
mainfrom
ci/a-failing-step-fails-the-job

Conversation

@christiangda

@christiangda christiangda commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

What

A failing step fails the job. The pull request and release workflows ran their steps with GitHub's default shell for a step that names none, bash -e {0}, which has no pipefail. Two steps pipe their command into tee for the step summary:

  • go test -race ... ./... | tee -a $GITHUB_STEP_SUMMARY
  • go-test-coverage --config=./.testcoverage.yml | sed ... | sed ... | tee -a $GITHUB_STEP_SUMMARY

A pipeline's status is its last command's, tee's, so a failing test or a coverage below its threshold passed the job.

How

defaults.run.shell: bash in both workflows. GitHub runs a step that names bash as bash --noprofile --norc -eo pipefail {0}, so a pipeline fails when any of its commands does. Nothing else changes.

Verified locally

  • The two shells, side by side: bash -e -c 'false | tee /dev/null; echo ...' goes on and exits 0; bash --noprofile --norc -eo pipefail -c '...' exits 1 at the pipeline.
  • actionlint on both workflows: nothing about this change.

🤖 Generated with Claude Code

Every step runs with "shell: bash", which GitHub runs with pipefail. A step
that names no shell runs as "bash -e" without it, so "go test ... | tee"
and the coverage check piped through sed and tee took tee's status: a
failing test or a coverage below its threshold passed the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@christiangda christiangda self-assigned this Oct 18, 2026
@christiangda
christiangda merged commit ef791fd into main Oct 18, 2026
1 check passed
@christiangda
christiangda deleted the ci/a-failing-step-fails-the-job branch October 18, 2026 08:54
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