chore(deps): update pre-commit hook commitizen-tools/commitizen to v4.11.0 #736
Workflow file for this run
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: | |
| - main | |
| pull_request: | |
| permissions: write-all | |
| concurrency: | |
| group: ${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| env: | |
| SKIP: no-commit-to-branch | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| - uses: pre-commit/[email protected] | |
| # Make sure commit messages follow the conventional commits convention: | |
| # https://www.conventionalcommits.org | |
| commitlint: | |
| name: Lint Commit Messages | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - uses: wagoid/[email protected] | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.13" | |
| - "3.14" | |
| os: | |
| - ubuntu-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: "pyproject.toml" | |
| activate-environment: true | |
| - name: Install Dependencies | |
| run: uv sync | |
| shell: bash | |
| - name: Test with Pytest | |
| run: pytest --cov-report=xml | |
| shell: bash | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| release: | |
| needs: | |
| - test | |
| - lint | |
| - commitlint | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.head_ref || github.ref_name }} | |
| # Do a dry run of PSR | |
| - name: Test release | |
| uses: python-semantic-release/[email protected] | |
| if: github.ref_name != 'main' | |
| with: | |
| no_operation_mode: true | |
| # On main branch: actual PSR + upload to PyPI & GitHub | |
| - name: Release | |
| uses: python-semantic-release/[email protected] | |
| id: release | |
| if: github.ref_name == 'main' | |
| with: | |
| verbosity: 2 | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish package distributions to GitHub Releases | |
| uses: python-semantic-release/upload-to-gh-release@main | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload | Distribution Artifacts | |
| uses: actions/upload-artifact@v5 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| name: distribution-artifacts | |
| path: dist | |
| if-no-files-found: error | |
| outputs: | |
| released: ${{ steps.release.outputs.released || 'false' }} | |
| deploy: | |
| needs: | |
| - release | |
| if: ${{ needs.release.outputs.released == 'true' }} | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Setup | Download Build Artifacts | |
| uses: actions/download-artifact@v6 | |
| id: artifact-download | |
| with: | |
| name: distribution-artifacts | |
| path: dist/ | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 |