Bump actions/checkout from 5 to 6 in /.github/workflows #170
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: Code Quality | |
| on: | |
| pull_request: | |
| types: [ opened, synchronize, reopened, edited, ready_for_review ] | |
| jobs: | |
| code-quality: | |
| name: Code Quality Checks | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Step 1: Checkout the repository code | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| # Step 2: Install uv | |
| - name: Install uv | |
| run: | | |
| curl -Ls https://astral.sh/uv/install.sh | bash | |
| echo "${HOME}/.local/bin" >> $GITHUB_PATH | |
| # Step 3: Set up environment and install dependencies | |
| - name: Install dependencies | |
| run: | | |
| uv venv .venv | |
| uv sync --frozen --extra dev | |
| uv pip install -e . | |
| # Step 4: Get changed Python files | |
| - name: Get Python changed files | |
| id: changed-py-files | |
| uses: tj-actions/changed-files@v47 | |
| with: | |
| files: | | |
| *.py | |
| **/*.py | |
| # Step 5: Run Ruff for only changed files | |
| - name: Run Ruff (Lint) | |
| if: steps.changed-py-files.outputs.any_changed == 'true' | |
| run: | | |
| echo "Running Ruff on changed files..." | |
| echo "Changed files: ${{ steps.changed-py-files.outputs.all_changed_files }}" | |
| uv run ruff check ${{ steps.changed-py-files.outputs.all_changed_files }} | |
| # Step 6: Run Pyright for only changed files | |
| - name: Run Pyright (Type Check) | |
| if: steps.changed-py-files.outputs.any_changed == 'true' | |
| run: | | |
| echo "Running Pyright on changed files..." | |
| echo "Changed files: ${{ steps.changed-py-files.outputs.all_changed_files }}" | |
| uv run pyright ${{ steps.changed-py-files.outputs.all_changed_files }} |