Bump py-cov-action/python-coverage-comment-action from 3.40 to 3.41 #30
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
| # SPDX-FileCopyrightText: Copyright © 2026 BBC | |
| # | |
| # SPDX-License-Identifier: BSD-3-Clause | |
| name: CI | |
| # Controls when the workflow will run | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Gives the action the necessary permissions for publishing new | |
| # comments in pull requests. | |
| pull-requests: write | |
| # Gives the action the necessary permissions for pushing data to the | |
| # python-coverage-comment-action branch, and for editing existing | |
| # comments (to avoid publishing multiple comments in the same PR) | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: recursive | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.1.0 | |
| with: | |
| # Install a specific version of uv. | |
| version: "0.10.2" | |
| enable-cache: true | |
| - name: Install the project | |
| run: uv sync --locked --all-extras --dev | |
| - name: REUSE Compliance Check | |
| run: | | |
| uv run reuse lint | |
| - name: ruff Python lint | |
| run: | | |
| uv run ruff check --output-format=github | |
| - name: ty Type check | |
| run: | | |
| uv run ty check | |
| - name: Run the tests and gather coverage | |
| run: | | |
| uv run coverage run -m unittest discover | |
| - name: Coverage comment | |
| id: coverage_comment | |
| uses: py-cov-action/python-coverage-comment-action@v3.41 | |
| with: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Store Pull Request comment to be posted | |
| uses: actions/upload-artifact@v7 | |
| if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true' | |
| with: | |
| # If you use a different name, update COMMENT_ARTIFACT_NAME accordingly | |
| name: python-coverage-comment-action | |
| # If you use a different name, update COMMENT_FILENAME accordingly | |
| path: python-coverage-comment-action.txt |