mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-26 20:09:22 +00:00
Ensure that ecosystem check job fails if the tooling encounters an unexpected error (#8365)
Previously, `| tee` would hide bad exit codes from `ruff-ecosystem ...`
See poc failure at
1820085264
This commit is contained in:
parent
c674db6e51
commit
982ae6ff08
1 changed files with 6 additions and 0 deletions
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
|
@ -215,6 +215,9 @@ jobs:
|
||||||
# Make executable, since artifact download doesn't preserve this
|
# Make executable, since artifact download doesn't preserve this
|
||||||
chmod +x ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff
|
chmod +x ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff
|
||||||
|
|
||||||
|
# Set pipefail to avoid hiding errors with tee
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
ruff-ecosystem check ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-check
|
ruff-ecosystem check ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-check
|
||||||
|
|
||||||
cat ecosystem-result-check > $GITHUB_STEP_SUMMARY
|
cat ecosystem-result-check > $GITHUB_STEP_SUMMARY
|
||||||
|
@ -227,6 +230,9 @@ jobs:
|
||||||
# Make executable, since artifact download doesn't preserve this
|
# Make executable, since artifact download doesn't preserve this
|
||||||
chmod +x ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff
|
chmod +x ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff
|
||||||
|
|
||||||
|
# Set pipefail to avoid hiding errors with tee
|
||||||
|
set -eo pipefail
|
||||||
|
|
||||||
ruff-ecosystem format ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-format
|
ruff-ecosystem format ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-format
|
||||||
|
|
||||||
cat ecosystem-result-format > $GITHUB_STEP_SUMMARY
|
cat ecosystem-result-format > $GITHUB_STEP_SUMMARY
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue