maintenance: run the lint step under bash so failures are not discarded on Windows - #893
Merged
Merged
Conversation
…ed on Windows The 'Lint and format check' step runs two commands in one run: block. With no shell: key GitHub uses pwsh on Windows, where the step's exit status comes from $LASTEXITCODE of the last command only. 'ruff format --check' passes, so a preceding 'ruff check' failure is discarded and the job reports success. On Linux and macOS the same block runs under 'bash -e' and aborts on the first failure. Observed in run 30165454624 (2026-07-25, before adbar#892): every ubuntu and macos job failed at this step, while build (windows-latest, 3.11) reported success. Its log contains 'Found 103 errors.' immediately followed by '41 files already formatted'. Setting shell: bash gives all three runners the same behaviour.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #893 +/- ##
=======================================
Coverage 99.68% 99.68%
=======================================
Files 21 21
Lines 4099 4099
=======================================
Hits 4086 4086
Misses 13 13 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Owner
|
Good catch, thanks. |
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.
On
windows-latesttheLint and format checkstep reports success even whenruff checkfails.The step runs two commands in one
run:block. With noshell:key GitHub usespwshon Windows, and the step's exit status is taken from$LASTEXITCODEof the last command only.ruff format --checkpasses, so a precedingruff checkfailure is discarded. On Linux and macOS the same block runs underbash -eand stops at the first failure.This has already happened here. Run 30165454624 (2026-07-25, before #892): every ubuntu and macos job failed at that step, while
build (windows-latest, 3.11)reported success. Its log readsA/B check on a fork of this repo. Same deliberate
F401intrafilatura/utils.pyin both arms; the only difference is the workflow.build (windows-latest, 3.11)shell: bashThe 3m09s is the Windows job discarding the lint failure and going on to run the full test suite. The 31s is it stopping at the lint step, like every other runner.
bashships on GitHub's Windows images, so nothing else needs to change. If you would rather not depend on that, splitting the step into tworun:steps fixes it just as well and gives each command its own entry in the UI. Happy to redo it that way, or to close this if you would rather handle it differently.This is latent today: with #892 merged,
ruff check .passes onmaster. It matters the next time lint actually fails.