Repository navigation
chore(deps): update dependency python to 3.15 (#679) #1768
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 | |
| with: | |
| python-version: "3.15" # renovate: customPinnedDependency=python,datasource=python-version | |
| - uses: j178/prek-action@1382ad72dea72f9d53832f2bcb65b3e87a947204 # v3.0.1 | |
| # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1 | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: | |
| - "3.12" | |
| - "3.13" | |
| - "3.14" # renovate: depName=python datasource=python-version | |
| os: | |
| - ubuntu-latest | |
| - windows-latest | |
| - macOS-latest | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Extract UV version | |
| run: | | |
| echo "UV_VERSION=$(./scripts/get-pyproject-uv.version.sh)" >> "$GITHUB_ENV" | |
| shell: bash | |
| - name: Setup UV | |
| uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0 | |
| with: | |
| version: ${{ env.UV_VERSION }} | |
| - name: Verify lock consistency | |
| run: uv lock --check | |
| shell: bash | |
| - name: Sync Dependencies | |
| run: uv sync --frozen --all-groups | |
| shell: bash | |
| - name: Test with Pytest | |
| run: uv run pytest --cov-report=xml | |
| shell: bash | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| release: | |
| needs: | |
| - test | |
| - lint | |
| - commitlint | |
| runs-on: ubuntu-latest | |
| environment: release | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| # Checkout must work for both PRs (including forks) and pushes to main | |
| - name: Checkout code | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name }} | |
| repository: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name || github.repository }} | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 | |
| with: | |
| python-version: "3.15" # renovate: customPinnedDependency=python,datasource=python-version | |
| # Do a dry run of PSR | |
| - name: Test release | |
| uses: python-semantic-release/python-semantic-release@b700dbeb1f431a0fcc30a79f3f0869407fe07278 # v10.7.0 | |
| if: github.event_name == 'pull_request' | |
| with: | |
| no_operation_mode: true | |
| vcs_release: false | |
| push: false | |
| tag: false | |
| github_token: ${{ github.token }} | |
| # On main branch: actual PSR + upload to PyPI & GitHub | |
| - name: Release | |
| uses: python-semantic-release/python-semantic-release@b700dbeb1f431a0fcc30a79f3f0869407fe07278 # v10.7.0 | |
| id: release | |
| if: github.event_name == 'push' && github.ref_name == 'main' | |
| with: | |
| verbosity: 2 # equivalent to "-vv" | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| packages-dir: dist | |
| - name: Publish package distributions to GitHub Releases | |
| uses: python-semantic-release/publish-action@99d4062dd393b5a7a62c5fe9ed78fb364b5674f2 # v10.7.0 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| tag: ${{ steps.release.outputs.tag }} |