ci: bump action versions — checkout@v6, setup-uv@v7, setup-python@v6 #6
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: CI | |
| on: | |
| push: | |
| branches: ["**"] | |
| tags-ignore: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| if: "!startsWith(github.event.head_commit.message, 'bump:')" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.12" | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run pre-commit (ruff + mypy + commitizen + gitleaks) | |
| run: uv run pre-commit run --all-files --show-diff-on-failure | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run tests | |
| run: uv run pytest --tb=short | |
| ci: | |
| name: CI | |
| runs-on: ubuntu-latest | |
| needs: [lint, test] | |
| if: always() | |
| steps: | |
| - name: Check required jobs | |
| run: | | |
| if [[ "${{ needs.lint.result }}" != "success" && "${{ needs.lint.result }}" != "skipped" ]]; then | |
| echo "lint failed" && exit 1 | |
| fi | |
| if [[ "${{ needs.test.result }}" != "success" && "${{ needs.test.result }}" != "skipped" ]]; then | |
| echo "test failed" && exit 1 | |
| fi | |
| echo "All required checks passed." |