Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ jobs:
DB_PASSWORD: debug_toolbar
DB_HOST: 127.0.0.1
DB_PORT: 3306
COVERAGE_FILE: ".coverage.mysql.${{ matrix.python_version }}"

- name: Store coverage file
uses: actions/upload-artifact@v4
with:
name: coverage-mysql-${{ matrix.python_version }}
path: .coverage.mysql.${{ matrix.python_version }}
include-hidden-files: true


postgres:
Expand Down Expand Up @@ -163,6 +171,14 @@ jobs:
DB_HOST: localhost
DB_PORT: 5432
DJANGO_SELENIUM_TESTS: ${{ matrix.env.DJANGO_SELENIUM_TESTS }}
COVERAGE_FILE: ".coverage.postgres.${{ matrix.python_version }}"

- name: Store coverage file
uses: actions/upload-artifact@v4
with:
name: coverage-postgres-${{ matrix.python_version }}
path: .coverage.postgres.${{ matrix.python_version }}
include-hidden-files: true

sqlite:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -207,6 +223,14 @@ jobs:
env:
DB_BACKEND: sqlite3
DB_NAME: ":memory:"
COVERAGE_FILE: ".coverage.sqlite.${{ matrix.python_version }}"

- name: Store coverage file
uses: actions/upload-artifact@v4
with:
name: coverage-sqlite-${{ matrix.python_version }}
path: .coverage.sqlite.${{ matrix.python_version }}
include-hidden-files: true

lint:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -244,3 +268,38 @@ jobs:

- name: Test with tox
run: tox -e docs,packaging

coverage:
name: Coverage
runs-on: ubuntu-latest
needs:
- mysql
- postgres
- sqlite
permissions:
pull-requests: write
contents: write
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/download-artifact@v4
id: download
with:
pattern: coverage-*
merge-multiple: true

- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@6494290850a5098c2836298dad8f11082b4ceaa9 # v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MERGE_COVERAGE_FILES: true

- name: Store Pull Request comment to be posted
uses: actions/upload-artifact@v4
if: steps.coverage_comment.outputs.COMMENT_FILE_WRITTEN == 'true'
with:
name: python-coverage-comment-action
path: python-coverage-comment-action.txt
1 change: 1 addition & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Pending

* Deprecated ``RedirectsPanel`` in favor of ``HistoryPanel`` for viewing
toolbar data from redirected requests.
* Fixed support for generating code coverage comments in PRs.

6.1.0 (2025-10-30)
------------------
Expand Down
Loading