Skip to content

Commit d0e23d1

Browse files
thodson-usgsclaude
andcommitted
ci: run the pytest step under bash so test failures fail the job
The "Test with pytest and report coverage" step runs two commands in one block. On Windows the default pwsh shell only propagates the LAST command's exit code, so a failing `coverage run -m pytest` followed by a passing `coverage report` was reported as a green job — a false pass that masked a real test failure. Forcing `shell: bash` (run with -eo pipefail) aborts on the pytest failure on every OS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent da1d0ac commit d0e23d1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/python-package.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ jobs:
4747
python -m pip install --upgrade pip
4848
pip install .[test,nldi]
4949
- name: Test with pytest and report coverage
50+
# Force bash on Windows too: the default pwsh shell only propagates the
51+
# last command's exit code, so a pytest failure followed by a passing
52+
# ``coverage report`` was reported as a green job (false pass).
53+
shell: bash
5054
run: |
5155
coverage run -m pytest tests/
5256
coverage report -m

0 commit comments

Comments
 (0)