Skip to content

Conversation

@maxisbey
Copy link
Contributor

Summary

Fixes inconsistent CI behavior where Windows tests appeared to pass even when pytest failed.

Problem

The pytest step runs multiple commands:

uv run --frozen --no-sync coverage run -m pytest
uv run --frozen --no-sync coverage combine
uv run --frozen --no-sync coverage report

On Linux (bash): When pytest fails, bash's set -e stops execution immediately → step exits with code 1 → marked as failed.

On Windows (PowerShell): PowerShell doesn't stop on first error by default. When pytest fails, it continues to run coverage combine and coverage report. Since the last command succeeds → step exits with code 0 → marked as passed (incorrectly).

Solution

Add shell: bash to the pytest step. Bash is available on Windows runners in GitHub Actions and provides consistent error handling behavior across platforms.

…ndling

On Windows, PowerShell doesn't stop on first error by default. When pytest
fails, PowerShell continues to run coverage combine/report, and if those
succeed, the step exits with code 0 (appearing to pass).

Using 'shell: bash' ensures consistent behavior across platforms - bash's
set -e stops execution on the first failed command.

Claude-Generated-By: Claude Code (cli/claude-opus-4-5=100%)
Claude-Steers: 4
Claude-Permission-Prompts: 4
Claude-Escapes: 0
@Kludex Kludex merged commit 72a8631 into main Jan 15, 2026
25 checks passed
@Kludex Kludex deleted the fix-windows-ci-exit-code branch January 15, 2026 16:32
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.

3 participants