diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 657760fb21..f49d3bfc32 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -209,7 +209,7 @@ jobs: run: | pip install ./python/ruff-ecosystem - - name: Run `ruff check` ecosystem check + - name: Run `ruff check` stable ecosystem check if: ${{ needs.determine_changes.outputs.linter == 'true' }} run: | # Make executable, since artifact download doesn't preserve this @@ -218,13 +218,30 @@ jobs: # 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 --force-preview | tee ecosystem-result-check + ruff-ecosystem check ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-check-stable - cat ecosystem-result-check > $GITHUB_STEP_SUMMARY - cat ecosystem-result-check > ecosystem-result + cat ecosystem-result-check-stable > $GITHUB_STEP_SUMMARY + echo "### Linter (stable)" > ecosystem-result + cat ecosystem-result-check-stable >> ecosystem-result echo "" >> ecosystem-result - - name: Run `ruff format` ecosystem check + - name: Run `ruff check` preview ecosystem check + if: ${{ needs.determine_changes.outputs.linter == 'true' }} + run: | + # Make executable, since artifact download doesn't preserve this + 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 --force-preview | tee ecosystem-result-check-preview + + cat ecosystem-result-check-preview > $GITHUB_STEP_SUMMARY + echo "### Linter (preview)" >> ecosystem-result + cat ecosystem-result-check-preview >> ecosystem-result + echo "" >> ecosystem-result + + - name: Run `ruff format` stable ecosystem check if: ${{ needs.determine_changes.outputs.formatter == 'true' }} run: | # Make executable, since artifact download doesn't preserve this @@ -233,10 +250,28 @@ jobs: # 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 --force-preview | tee ecosystem-result-format + ruff-ecosystem format ./ruff ${{ steps.ruff-target.outputs.download-path }}/ruff --cache ./checkouts --output-format markdown | tee ecosystem-result-format-stable - cat ecosystem-result-format > $GITHUB_STEP_SUMMARY - cat ecosystem-result-format >> ecosystem-result + cat ecosystem-result-format-stable > $GITHUB_STEP_SUMMARY + echo "### Formatter (stable)" >> ecosystem-result + cat ecosystem-result-format-stable >> ecosystem-result + echo "" >> ecosystem-result + + - name: Run `ruff format` preview ecosystem check + if: ${{ needs.determine_changes.outputs.formatter == 'true' }} + run: | + # Make executable, since artifact download doesn't preserve this + 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 --force-preview | tee ecosystem-result-format-preview + + cat ecosystem-result-format-preview > $GITHUB_STEP_SUMMARY + echo "### Formatter (preview)" >> ecosystem-result + cat ecosystem-result-format-preview >> ecosystem-result + echo "" >> ecosystem-result - name: Export pull request number run: | diff --git a/.github/workflows/pr-comment.yaml b/.github/workflows/pr-comment.yaml index f6ac19dcb0..a7d77d0ec8 100644 --- a/.github/workflows/pr-comment.yaml +++ b/.github/workflows/pr-comment.yaml @@ -48,9 +48,7 @@ jobs: id: generate-comment if: steps.download-ecosystem-result.outputs.found_artifact == 'true' run: | - echo '## PR Check Results' >> comment.txt - - echo "### Ecosystem" >> comment.txt + echo '## `ruff-ecosystem` results' >> comment.txt cat pr/ecosystem/ecosystem-result >> comment.txt echo "" >> comment.txt