Rename ContributionGuide.md to CONTRIBUTION_GUIDE.md #4
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
| name: Ruff | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| jobs: | |
| ruff: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v3 | |
| - name: Cache uv | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/uv | |
| key: ${{ runner.os }}-uv | |
| - name: Run Ruff and generate report | |
| run: | | |
| LOG_DIR="__ruff_logs__" | |
| LOG_FILE="$LOG_DIR/ruff-lint-log.txt" | |
| mkdir -p $LOG_DIR | |
| echo "Running Ruff checks..." > $LOG_FILE | |
| echo "" >> $LOG_FILE | |
| echo "Lint results:" >> $LOG_FILE | |
| uv tool run ruff check . --output-format=github >> $LOG_FILE 2>&1 || true | |
| echo "" >> $LOG_FILE | |
| echo "Suggested fixes (diff):" >> $LOG_FILE | |
| uv tool run ruff check . --fix --diff >> $LOG_FILE 2>&1 || true | |
| echo "" >> $LOG_FILE | |
| if grep -q ":" $LOG_FILE; then | |
| echo "Ruff found issues." | |
| else | |
| echo "All checks passed." | |
| fi | |
| - name: Upload Ruff report | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ruff-lint-log | |
| path: __ruff_logs__/ruff-lint-log.txt |