chore(deps): update dependency ruff to v0.15.20 (main) #202
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
| # Run pytest unit tests on pull requests | |
| name: Run Pytest Unit Tests | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Check if tests should be skipped | |
| id: skip_check | |
| uses: ./.github/actions/should-skip-build | |
| with: | |
| commit-sha: ${{ github.sha }} | |
| check-image: 'false' | |
| file-patterns: | | |
| ^.*\.md$ | |
| ^renovate\.json$ | |
| ^examples\/ | |
| ^\.cursor\/ | |
| - name: Set up Python | |
| if: steps.skip_check.outputs.should_skip != 'true' | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: '3.14' | |
| cache: 'pip' | |
| - name: Install dependencies | |
| if: steps.skip_check.outputs.should_skip != 'true' | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -r requirements.dev.txt | |
| - name: Lint with ruff | |
| if: steps.skip_check.outputs.should_skip != 'true' | |
| run: | | |
| ruff check src/ tests/ | |
| ruff format --check src/ tests/ | |
| - name: Type check with mypy | |
| if: steps.skip_check.outputs.should_skip != 'true' | |
| run: | | |
| mypy | |
| - name: Run pytest | |
| if: steps.skip_check.outputs.should_skip != 'true' | |
| run: | | |
| pytest | |
| - name: Test Summary | |
| if: steps.skip_check.outputs.should_skip != 'true' | |
| run: | | |
| echo "## Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ All tests passed successfully!" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| - name: Test Skipped Summary | |
| if: steps.skip_check.outputs.should_skip == 'true' | |
| env: | |
| SKIP_REASON: ${{ steps.skip_check.outputs.skip_reason }} | |
| COMMIT_SHA: ${{ github.sha }} | |
| run: | | |
| SHORT_SHA="${COMMIT_SHA:0:7}" | |
| echo "## Tests Skipped" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Reason" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "${SKIP_REASON}" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "### Details" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Commit SHA**: \`${COMMIT_SHA}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "- **Short SHA**: \`${SHORT_SHA}\`" >> $GITHUB_STEP_SUMMARY | |
| echo "" >> $GITHUB_STEP_SUMMARY | |
| echo "No test execution was performed." >> $GITHUB_STEP_SUMMARY | |