Skip to content

fix(ci): prevent set -e from aborting coverage capture - #649

Merged
namastex888 merged 1 commit into
devfrom
fix/ci-coverage-capture
Mar 17, 2026
Merged

namastex888 merged 1 commit into
devfrom
fix/ci-coverage-capture

Conversation

@namastex888

Copy link
Copy Markdown
Contributor

Summary

  • bash -e kills the CI script when bun test --coverage exits non-zero, before output is printed or the coverage threshold check runs
  • Adding || true lets the script capture output regardless of exit code, then the existing threshold logic handles pass/fail

One-line fix: COVERAGE_OUTPUT=$(bun test --coverage 2>&1) || true

Context

This was caught on PR #644 (rolling promotion) — the quality gate crashed silently with no test output.

Test plan

  • CI quality gate prints coverage output even when bun exits non-zero

bash -e causes the script to exit immediately when bun test --coverage
returns non-zero, before the output can be printed or parsed. Adding
|| true lets the script capture output regardless of exit code.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported.

@coderabbitai

coderabbitai Bot commented Mar 17, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 43ed854f-3dd5-4890-81ae-ca883a8ee584

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/ci-coverage-capture
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@namastex888
namastex888 merged commit 90950d4 into dev Mar 17, 2026
6 checks passed
@namastex888
namastex888 deleted the fix/ci-coverage-capture branch March 17, 2026 23:29

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c72a11a22b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/ci.yml
- name: Test with coverage
run: |
COVERAGE_OUTPUT=$(bun test --coverage 2>&1)
COVERAGE_OUTPUT=$(bun test --coverage 2>&1) || true

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Preserve failing test exit status

Swallowing bun test --coverage with || true makes this step ignore test failures entirely. In GitHub Actions, the quality gate now only checks parsed coverage, so a run with failing tests can still succeed if coverage parses above the threshold (or even exit 0 via the existing LINE_COV empty branch), which regresses the intended test gate behavior.

Useful? React with 👍 / 👎.

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