From 4e57e340fbf6b0902d8c60c01884a6acef675a2a Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 05:23:43 -0400 Subject: [PATCH 01/52] Attempt to make codecov less important --- .github/workflows/main.yml | 135 +++++++++++++++++++++++++------------ 1 file changed, 92 insertions(+), 43 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d56f905e..794b1492 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,49 +20,11 @@ permissions: {} jobs: test: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest continue-on-error: ${{ matrix.allow_failure }} - timeout-minutes: 15 + timeout-minutes: 5 permissions: contents: read - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Setup mysql - if: contains(matrix.name, 'mysql') - run: | - sudo systemctl start mysql.service - echo "TEST_DB_USER=root" >> $GITHUB_ENV - echo "TEST_DB_PASSWORD=root" >> $GITHUB_ENV - - - name: Setup postgresql - if: contains(matrix.name, 'postgres') - run: | - sudo systemctl start postgresql.service - sudo -u postgres createuser --createdb $USER - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox==4.11.1 - - - name: Run tox - run: tox -e ${{ matrix.name }} - - - name: Report coverage - if: contains(matrix.name, 'coverage') - uses: codecov/codecov-action@v5 - with: - fail_ci_if_error: true - files: ./coverage.xml - token: ${{ secrets.CODECOV_TOKEN }} - strategy: fail-fast: false matrix: @@ -144,14 +106,101 @@ jobs: - name: pypy3-dj42-postgres python: 'pypy3.9' allow_failure: false + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Setup mysql + if: contains(matrix.name, 'mysql') + run: | + sudo systemctl start mysql.service + echo "TEST_DB_USER=root" >> $GITHUB_ENV + echo "TEST_DB_PASSWORD=root" >> $GITHUB_ENV + + - name: Setup postgresql + if: contains(matrix.name, 'postgres') + run: | + sudo systemctl start postgresql.service + sudo -u postgres createuser --createdb $USER + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox==4.26.0 + + - name: Run tox + run: tox -e ${{ matrix.name }} + + - name: Prepare coverage file for upload + run: mv .coverage .coverage.${{ matrix.name }} + + - name: Upload temporary coverage artifact + uses: actions/upload-artifact@v4 + with: + name: coverage-artifact-${{ matrix.name }} + path: .coverage.${{ matrix.name }} + retention-days: 1 + + report-coverage: + name: Report Combined Coverage + runs-on: ubuntu-latest + needs: test + if: always() + permissions: + contents: read + actions: read + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install coverage tool + run: python -m pip install coverage[toml] + + - name: Download all coverage artifacts + uses: actions/download-artifact@v4 + with: + path: downloaded-coverage-artifacts + pattern: coverage-artifact-* + + - name: Combine coverage reports + run: | + mkdir combined_coverage_data + find downloaded-coverage-artifacts -type f -name '.coverage.*' -exec cp {} combined_coverage_data/ \; + echo "Files in combined_coverage_data for combining:" + ls -R combined_coverage_data + cd combined_coverage_data + coverage combine --keep + echo "Combined .coverage file generated. Generating XML report." + coverage xml -o ../coverage.xml + cd .. + echo "Generated coverage.xml in workspace root:" + ls -l coverage.xml + + - name: Report coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + verbose: true - check: # This job does nothing and is only used for the branch protection + check: if: always() needs: - - test + - report-coverage - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest steps: - name: Decide whether the needed jobs succeeded or failed From b4b91748ccb1ed0521e190e18a53f89b509e7ba3 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:15:49 -0400 Subject: [PATCH 02/52] Update main.yml --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 794b1492..f4eb7060 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -137,7 +137,9 @@ jobs: run: tox -e ${{ matrix.name }} - name: Prepare coverage file for upload - run: mv .coverage .coverage.${{ matrix.name }} + run: | + ls -lash + mv .coverage .coverage.${{ matrix.name }} - name: Upload temporary coverage artifact uses: actions/upload-artifact@v4 From d85fe25b66950be835012473211c9401c140b372 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:23:39 -0400 Subject: [PATCH 03/52] Update main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f4eb7060..e02b2b9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -137,11 +137,13 @@ jobs: run: tox -e ${{ matrix.name }} - name: Prepare coverage file for upload + if: contains(matrix.name, 'coverage') run: | ls -lash mv .coverage .coverage.${{ matrix.name }} - name: Upload temporary coverage artifact + if: contains(matrix.name, 'coverage') uses: actions/upload-artifact@v4 with: name: coverage-artifact-${{ matrix.name }} From 4674b616192d671c38cf109b12b3f974ee578484 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:24:52 -0400 Subject: [PATCH 04/52] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e02b2b9f..0dcdc34c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -131,7 +131,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox==4.26.0 + pip install tox==4.24.0 - name: Run tox run: tox -e ${{ matrix.name }} From 8ee5187f1e9a60d9fca15601f4c3d5ebd2dea730 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:25:47 -0400 Subject: [PATCH 05/52] Update pyproject.toml --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3fb403da..aa623727 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,7 +29,6 @@ classifiers = [ "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", From e05f94e8a0332e47bf2dd45d1e3165bf47d22563 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:26:43 -0400 Subject: [PATCH 06/52] Update main.yml --- .github/workflows/main.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d56f905e..ec1afbbe 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -131,15 +131,6 @@ jobs: python: '3.11' allow_failure: false - - name: py38-dj42-sqlite-xdist-coverage - python: '3.8' - allow_failure: false - - # Explicitly test min pytest. - - name: py38-dj42-sqlite-pytestmin-coverage - python: '3.8' - allow_failure: false - # pypy3: not included with coverage reports (much slower then). - name: pypy3-dj42-postgres python: 'pypy3.9' From ed346b6d0bee268c683dc8dc6535d35dbf49bdcb Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:28:56 -0400 Subject: [PATCH 07/52] Update contributing.rst --- docs/contributing.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index d5003fc7..897d4ae0 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -140,10 +140,10 @@ writing), running them all will take a long time. All valid configurations can be found in `tox.ini`. To test against a few of them, invoke tox with the `-e` flag:: - $ tox -e py38-dj32-postgres,py310-dj41-mysql + $ tox -e py39-dj42-postgres,py310-dj52-mysql -This will run the tests on Python 3.8/Django 3.2/PostgeSQL and Python -3.10/Django 4.1/MySQL. +This will run the tests on Python 3.9/Django 4.2/PostgeSQL and Python +3.10/Django 5.2/MySQL. Measuring test coverage From 9faec5c9943535c84131ad58be37f7cb63da83e4 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:30:26 -0400 Subject: [PATCH 08/52] Update README.rst --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 90a9fb8d..87291333 100644 --- a/README.rst +++ b/README.rst @@ -32,9 +32,9 @@ pytest-django allows you to test your Django project/applications with the `_ * Version compatibility: - * Django: 4.2, 5.0, 5.1, 5.2 and latest main branch (compatible at the time + * Django: 4.2, 5.1, 5.2 and latest main branch (compatible at the time of each release) - * Python: CPython>=3.8 or PyPy 3 + * Python: CPython>=3.9 or PyPy 3 * pytest: >=7.0 For compatibility with older versions, use previous pytest-django releases. From 73883c5221ade9eb27224ddc240b6aa311e9a747 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:31:29 -0400 Subject: [PATCH 09/52] Update pyproject.toml --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index aa623727..61f2c006 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,7 +9,7 @@ build-backend = "setuptools.build_meta" name = "pytest-django" description = "A Django plugin for pytest." readme = "README.rst" -requires-python = ">=3.8" +requires-python = ">=3.9" dynamic = ["version"] authors = [ { name = "Andreas Pelme", email = "andreas@pelme.se" }, @@ -22,7 +22,6 @@ classifiers = [ "Development Status :: 5 - Production/Stable", "Framework :: Django", "Framework :: Django :: 4.2", - "Framework :: Django :: 5.0", "Framework :: Django :: 5.1", "Framework :: Django :: 5.2", "Intended Audience :: Developers", From a0c7a972be5c9192404e8883c7007a33564ae00b Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 10:32:32 -0400 Subject: [PATCH 10/52] Update tox.ini --- tox.ini | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tox.ini b/tox.ini index aed0b8a3..e064bc0c 100644 --- a/tox.ini +++ b/tox.ini @@ -1,11 +1,10 @@ [tox] envlist = py313-dj{main,52,51}-postgres - py312-dj{main,52,51,50,42}-postgres - py311-dj{main,52,51,50,42}-postgres - py310-dj{main,52,51,50,42}-postgres + py312-dj{main,52,51,42}-postgres + py311-dj{main,52,51,42}-postgres + py310-dj{main,52,51,42}-postgres py39-dj42-postgres - py38-dj42-postgres linting [testenv] From 71151c26555cb113608fdab87edcfd8055e4fea4 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 10:40:46 -0400 Subject: [PATCH 11/52] Minor import fixes (100% automatic) --- pytest_django/asserts.py | 3 ++- pytest_django/fixtures.py | 4 +--- pytest_django/plugin.py | 3 ++- pytest_django/runner.py | 3 ++- pytest_django_test/db_helpers.py | 2 +- tests/test_database.py | 2 +- tests/test_fixtures.py | 2 +- 7 files changed, 10 insertions(+), 9 deletions(-) diff --git a/pytest_django/asserts.py b/pytest_django/asserts.py index 14741066..0401b2ea 100644 --- a/pytest_django/asserts.py +++ b/pytest_django/asserts.py @@ -4,8 +4,9 @@ from __future__ import annotations +from collections.abc import Sequence from functools import wraps -from typing import TYPE_CHECKING, Any, Callable, Sequence +from typing import TYPE_CHECKING, Any, Callable from django import VERSION from django.test import LiveServerTestCase, SimpleTestCase, TestCase, TransactionTestCase diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py index 6dc05fdb..358bfd68 100644 --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -3,6 +3,7 @@ from __future__ import annotations import os +from collections.abc import Generator, Iterable, Sequence from contextlib import contextmanager from functools import partial from typing import ( @@ -11,13 +12,10 @@ Any, Callable, ContextManager, - Generator, - Iterable, List, Literal, Optional, Protocol, - Sequence, Tuple, Union, ) diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index e8e629f4..e2a73c82 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -12,8 +12,9 @@ import pathlib import sys import types +from collections.abc import Generator from functools import reduce -from typing import TYPE_CHECKING, ContextManager, Generator, List, NoReturn +from typing import TYPE_CHECKING, ContextManager, List, NoReturn import pytest diff --git a/pytest_django/runner.py b/pytest_django/runner.py index d9032622..1b6571cc 100644 --- a/pytest_django/runner.py +++ b/pytest_django/runner.py @@ -1,5 +1,6 @@ from argparse import ArgumentParser -from typing import Any, Iterable +from collections.abc import Iterable +from typing import Any class TestRunner: diff --git a/pytest_django_test/db_helpers.py b/pytest_django_test/db_helpers.py index 712af0d3..b9efe86d 100644 --- a/pytest_django_test/db_helpers.py +++ b/pytest_django_test/db_helpers.py @@ -3,7 +3,7 @@ import os import sqlite3 import subprocess -from typing import Mapping +from collections.abc import Mapping import pytest from django.conf import settings diff --git a/tests/test_database.py b/tests/test_database.py index c6389756..2fec1352 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -1,6 +1,6 @@ from __future__ import annotations -from typing import Generator +from collections.abc import Generator import pytest from django.db import connection, transaction diff --git a/tests/test_fixtures.py b/tests/test_fixtures.py index f88ed802..709ae6c9 100644 --- a/tests/test_fixtures.py +++ b/tests/test_fixtures.py @@ -5,8 +5,8 @@ """ import socket +from collections.abc import Generator from contextlib import contextmanager -from typing import Generator from urllib.error import HTTPError from urllib.request import urlopen From bb091a526b55dddf1f7ceb8f62c7868d12b4e523 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 10:47:11 -0400 Subject: [PATCH 12/52] Minor import fixes (100% manual) --- pytest_django/fixtures.py | 24 ++++++------------------ pytest_django/plugin.py | 9 +++++---- tests/test_runner.py | 2 +- 3 files changed, 12 insertions(+), 23 deletions(-) diff --git a/pytest_django/fixtures.py b/pytest_django/fixtures.py index 358bfd68..c1bf9ca1 100644 --- a/pytest_django/fixtures.py +++ b/pytest_django/fixtures.py @@ -4,21 +4,9 @@ import os from collections.abc import Generator, Iterable, Sequence -from contextlib import contextmanager +from contextlib import AbstractContextManager, contextmanager from functools import partial -from typing import ( - TYPE_CHECKING, - AbstractSet, - Any, - Callable, - ContextManager, - List, - Literal, - Optional, - Protocol, - Tuple, - Union, -) +from typing import TYPE_CHECKING, Any, Callable, Literal, Optional, Protocol, Union import pytest @@ -35,9 +23,9 @@ _DjangoDbDatabases = Optional[Union[Literal["__all__"], Iterable[str]]] -_DjangoDbAvailableApps = Optional[List[str]] +_DjangoDbAvailableApps = Optional[list[str]] # transaction, reset_sequences, databases, serialized_rollback, available_apps -_DjangoDb = Tuple[bool, bool, _DjangoDbDatabases, bool, _DjangoDbAvailableApps] +_DjangoDb = tuple[bool, bool, _DjangoDbDatabases, bool, _DjangoDbAvailableApps] __all__ = [ @@ -155,7 +143,7 @@ def _get_databases_for_test(test: pytest.Item) -> tuple[Iterable[str], bool]: def _get_databases_for_setup( items: Sequence[pytest.Item], -) -> tuple[AbstractSet[str], AbstractSet[str]]: +) -> tuple[set[str], set[str]]: """Get the database aliases that need to be setup, and the subset that needs to be serialized.""" # Code derived from django.test.utils.DiscoverRunner.get_databases(). @@ -734,7 +722,7 @@ def __call__( *, using: str = ..., execute: bool = ..., - ) -> ContextManager[list[Callable[[], Any]]]: + ) -> AbstractContextManager[list[Callable[[], Any]]]: pass # pragma: no cover diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index e2a73c82..00c3744b 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -13,8 +13,9 @@ import sys import types from collections.abc import Generator +from contextlib import AbstractContextManager from functools import reduce -from typing import TYPE_CHECKING, ContextManager, List, NoReturn +from typing import TYPE_CHECKING, NoReturn import pytest @@ -260,7 +261,7 @@ def _get_boolean_value( ) from None -report_header_key = pytest.StashKey[List[str]]() +report_header_key = pytest.StashKey[list[str]]() @pytest.hookimpl() @@ -838,13 +839,13 @@ def _blocking_wrapper(*args, **kwargs) -> NoReturn: '"db" or "transactional_db" fixtures to enable it.' ) - def unblock(self) -> ContextManager[None]: + def unblock(self) -> AbstractContextManager[None]: """Enable access to the Django database.""" self._save_active_wrapper() self._dj_db_wrapper.ensure_connection = self._real_ensure_connection return _DatabaseBlockerContextManager(self) - def block(self) -> ContextManager[None]: + def block(self) -> AbstractContextManager[None]: """Disable access to the Django database.""" self._save_active_wrapper() self._dj_db_wrapper.ensure_connection = self._blocking_wrapper diff --git a/tests/test_runner.py b/tests/test_runner.py index 71fd7160..a0bee059 100644 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -6,7 +6,7 @@ @pytest.mark.parametrize( - "kwargs, expected", + ("kwargs", "expected"), [ ({}, call(["tests"])), ({"verbosity": 0}, call(["--quiet", "tests"])), From ce156bec542e4d5107843e4a6fcad46ca0cc36f7 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 12:15:57 -0400 Subject: [PATCH 13/52] Update main.yml --- .github/workflows/main.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bcc57620..5c0a7532 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -93,8 +93,7 @@ jobs: python: '3.11' allow_failure: false - # pypy3: not included with coverage reports (much slower then). - - name: pypy3-dj42-postgres + - name: pypy3-dj42-postgres-coverage python: 'pypy3.9' allow_failure: false steps: From 3dadd6794791736087d602d4128b6093fd793ff9 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 12:19:08 -0400 Subject: [PATCH 14/52] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5c0a7532..ccffc63c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -121,7 +121,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install tox==4.24.0 + pip install tox==4.26.0 - name: Run tox run: tox -e ${{ matrix.name }} From 95981481fd846938236eab1638d4723ba6e149e8 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 12:21:16 -0400 Subject: [PATCH 15/52] Update main.yml --- .github/workflows/main.yml | 122 ++++++++++++++++++------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ccffc63c..83cd0ab4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -140,64 +140,64 @@ jobs: path: .coverage.${{ matrix.name }} retention-days: 1 - report-coverage: - name: Report Combined Coverage - runs-on: ubuntu-latest - needs: test - if: always() - permissions: - contents: read - actions: read - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - - name: Install coverage tool - run: python -m pip install coverage[toml] - - - name: Download all coverage artifacts - uses: actions/download-artifact@v4 - with: - path: downloaded-coverage-artifacts - pattern: coverage-artifact-* - - - name: Combine coverage reports - run: | - mkdir combined_coverage_data - find downloaded-coverage-artifacts -type f -name '.coverage.*' -exec cp {} combined_coverage_data/ \; - echo "Files in combined_coverage_data for combining:" - ls -R combined_coverage_data - cd combined_coverage_data - coverage combine --keep - echo "Combined .coverage file generated. Generating XML report." - coverage xml -o ../coverage.xml - cd .. - echo "Generated coverage.xml in workspace root:" - ls -l coverage.xml - - - name: Report coverage to Codecov - uses: codecov/codecov-action@v5 - with: - files: ./coverage.xml - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - verbose: true - - check: - if: always() - - needs: - - report-coverage - - runs-on: ubuntu-latest - - steps: - - name: Decide whether the needed jobs succeeded or failed - uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302 - with: - jobs: ${{ toJSON(needs) }} + # report-coverage: + # name: Report Combined Coverage + # runs-on: ubuntu-latest + # needs: test + # if: always() + # permissions: + # contents: read + # actions: read + # steps: + # - uses: actions/checkout@v4 + # with: + # persist-credentials: false + + # - uses: actions/setup-python@v5 + # with: + # python-version: '3.11' + + # - name: Install coverage tool + # run: python -m pip install coverage[toml] + + # - name: Download all coverage artifacts + # uses: actions/download-artifact@v4 + # with: + # path: downloaded-coverage-artifacts + # pattern: coverage-artifact-* + + # - name: Combine coverage reports + # run: | + # mkdir combined_coverage_data + # find downloaded-coverage-artifacts -type f -name '.coverage.*' -exec cp {} combined_coverage_data/ \; + # echo "Files in combined_coverage_data for combining:" + # ls -R combined_coverage_data + # cd combined_coverage_data + # coverage combine --keep + # echo "Combined .coverage file generated. Generating XML report." + # coverage xml -o ../coverage.xml + # cd .. + # echo "Generated coverage.xml in workspace root:" + # ls -l coverage.xml + + # - name: Report coverage to Codecov + # uses: codecov/codecov-action@v5 + # with: + # files: ./coverage.xml + # token: ${{ secrets.CODECOV_TOKEN }} + # fail_ci_if_error: true + # verbose: true + + # check: + # if: always() + + # needs: + # - report-coverage + + # runs-on: ubuntu-latest + + # steps: + # - name: Decide whether the needed jobs succeeded or failed + # uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302 + # with: + # jobs: ${{ toJSON(needs) }} From b2e9a9d62d4a0c93578b3a734017e22d6b055754 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Mon, 26 May 2025 12:27:23 -0400 Subject: [PATCH 16/52] Update main.yml --- .github/workflows/main.yml | 126 ++++++++++++++++++------------------- 1 file changed, 62 insertions(+), 64 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 83cd0ab4..65bee860 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -128,9 +128,7 @@ jobs: - name: Prepare coverage file for upload if: contains(matrix.name, 'coverage') - run: | - ls -lash - mv .coverage .coverage.${{ matrix.name }} + run: mv .coverage .coverage.${{ matrix.name }} - name: Upload temporary coverage artifact if: contains(matrix.name, 'coverage') @@ -140,64 +138,64 @@ jobs: path: .coverage.${{ matrix.name }} retention-days: 1 - # report-coverage: - # name: Report Combined Coverage - # runs-on: ubuntu-latest - # needs: test - # if: always() - # permissions: - # contents: read - # actions: read - # steps: - # - uses: actions/checkout@v4 - # with: - # persist-credentials: false - - # - uses: actions/setup-python@v5 - # with: - # python-version: '3.11' - - # - name: Install coverage tool - # run: python -m pip install coverage[toml] - - # - name: Download all coverage artifacts - # uses: actions/download-artifact@v4 - # with: - # path: downloaded-coverage-artifacts - # pattern: coverage-artifact-* - - # - name: Combine coverage reports - # run: | - # mkdir combined_coverage_data - # find downloaded-coverage-artifacts -type f -name '.coverage.*' -exec cp {} combined_coverage_data/ \; - # echo "Files in combined_coverage_data for combining:" - # ls -R combined_coverage_data - # cd combined_coverage_data - # coverage combine --keep - # echo "Combined .coverage file generated. Generating XML report." - # coverage xml -o ../coverage.xml - # cd .. - # echo "Generated coverage.xml in workspace root:" - # ls -l coverage.xml - - # - name: Report coverage to Codecov - # uses: codecov/codecov-action@v5 - # with: - # files: ./coverage.xml - # token: ${{ secrets.CODECOV_TOKEN }} - # fail_ci_if_error: true - # verbose: true - - # check: - # if: always() - - # needs: - # - report-coverage - - # runs-on: ubuntu-latest - - # steps: - # - name: Decide whether the needed jobs succeeded or failed - # uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302 - # with: - # jobs: ${{ toJSON(needs) }} + report-coverage: + name: Report Combined Coverage + runs-on: ubuntu-latest + needs: test + if: always() + permissions: + contents: read + actions: read + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/setup-python@v5 + with: + python-version: '3.11' + + - name: Install coverage tool + run: python -m pip install coverage[toml] + + - name: Download all coverage artifacts + uses: actions/download-artifact@v4 + with: + path: downloaded-coverage-artifacts + pattern: coverage-artifact-* + + - name: Combine coverage reports + run: | + mkdir combined_coverage_data + find downloaded-coverage-artifacts -type f -name '.coverage.*' -exec cp {} combined_coverage_data/ \; + echo "Files in combined_coverage_data for combining:" + ls -R combined_coverage_data + cd combined_coverage_data + coverage combine --keep + echo "Combined .coverage file generated. Generating XML report." + coverage xml -o ../coverage.xml + cd .. + echo "Generated coverage.xml in workspace root:" + ls -l coverage.xml + + - name: Report coverage to Codecov + uses: codecov/codecov-action@v5 + with: + files: ./coverage.xml + token: ${{ secrets.CODECOV_TOKEN }} + fail_ci_if_error: true + verbose: true + + check: + if: always() + + needs: + - report-coverage + + runs-on: ubuntu-latest + + steps: + - name: Decide whether the needed jobs succeeded or failed + uses: re-actors/alls-green@223e4bb7a751b91f43eda76992bcfbf23b8b0302 + with: + jobs: ${{ toJSON(needs) }} From 454fc18fa933a57b8e0e7d1f003b4c8e988c0813 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 12:33:21 -0400 Subject: [PATCH 17/52] Add debug output to coverage file preparation in main.yml --- .github/workflows/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 65bee860..87c7f602 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -128,7 +128,10 @@ jobs: - name: Prepare coverage file for upload if: contains(matrix.name, 'coverage') - run: mv .coverage .coverage.${{ matrix.name }} + run: | + ls -lash + mv .coverage .coverage.${{ matrix.name }} + ls -lash - name: Upload temporary coverage artifact if: contains(matrix.name, 'coverage') From 574dea3576d09da9cc6008b39d13606d06397931 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 12:35:15 -0400 Subject: [PATCH 18/52] Remove coverage report and XML generation commands from tox.ini --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index e064bc0c..410daf2d 100644 --- a/tox.ini +++ b/tox.ini @@ -42,8 +42,6 @@ commands = coverage: coverage erase {env:PYTESTDJANGO_TEST_RUNNER:pytest} {posargs:tests} coverage: coverage combine - coverage: coverage report - coverage: coverage xml [testenv:linting] extras = From 5f92bc24633c4a0702eb2167285abe3d07fbf0a4 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 12:43:41 -0400 Subject: [PATCH 19/52] Refactor coverage artifact naming in main.yml to remove leading dot --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 87c7f602..8c33e795 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -130,7 +130,7 @@ jobs: if: contains(matrix.name, 'coverage') run: | ls -lash - mv .coverage .coverage.${{ matrix.name }} + mv .coverage coverage.${{ matrix.name }} ls -lash - name: Upload temporary coverage artifact @@ -138,7 +138,7 @@ jobs: uses: actions/upload-artifact@v4 with: name: coverage-artifact-${{ matrix.name }} - path: .coverage.${{ matrix.name }} + path: coverage.${{ matrix.name }} retention-days: 1 report-coverage: From 0dff300ad3c8d17e443863b8cf7598764c24aabe Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 12:46:23 -0400 Subject: [PATCH 20/52] Streamline event triggers in main.yml to use array syntax for push and pull_request --- .github/workflows/main.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8c33e795..e6176b3d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,12 +1,6 @@ name: main -on: - push: - branches: - - main - pull_request: - branches: - - main +on: [push, pull_request] concurrency: group: ci-main-${{ github.ref }} From f9bd682225a2db87c0622a96bdde65e513dd6658 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 12:55:27 -0400 Subject: [PATCH 21/52] . --- .github/workflows/main.yml | 84 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e6176b3d..4c9cd649 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,7 +16,7 @@ jobs: test: runs-on: ubuntu-latest continue-on-error: ${{ matrix.allow_failure }} - timeout-minutes: 5 + timeout-minutes: 15 permissions: contents: read strategy: @@ -27,53 +27,53 @@ jobs: python: '3.13' allow_failure: false - - name: py313-dj52-postgres-xdist-coverage - python: '3.13' - allow_failure: false + # - name: py313-dj52-postgres-xdist-coverage + # python: '3.13' + # allow_failure: false - - name: py313-dj51-postgres-xdist-coverage - python: '3.13' - allow_failure: false + # - name: py313-dj51-postgres-xdist-coverage + # python: '3.13' + # allow_failure: false - - name: py312-dj42-postgres-xdist-coverage - python: '3.12' - allow_failure: false + # - name: py312-dj42-postgres-xdist-coverage + # python: '3.12' + # allow_failure: false - - name: py311-dj50-postgres-xdist-coverage - python: '3.11' - allow_failure: false + # - name: py311-dj50-postgres-xdist-coverage + # python: '3.11' + # allow_failure: false - - name: py311-dj42-postgres-xdist-coverage - python: '3.11' - allow_failure: false + # - name: py311-dj42-postgres-xdist-coverage + # python: '3.11' + # allow_failure: false - - name: py310-dj52-postgres-xdist-coverage - python: '3.10' - allow_failure: false + # - name: py310-dj52-postgres-xdist-coverage + # python: '3.10' + # allow_failure: false - - name: py310-dj51-postgres-xdist-coverage - python: '3.10' - allow_failure: false + # - name: py310-dj51-postgres-xdist-coverage + # python: '3.10' + # allow_failure: false - - name: py310-dj42-postgres-xdist-coverage - python: '3.10' - allow_failure: false + # - name: py310-dj42-postgres-xdist-coverage + # python: '3.10' + # allow_failure: false - - name: py311-dj51-mysql-coverage - python: '3.11' - allow_failure: false + # - name: py311-dj51-mysql-coverage + # python: '3.11' + # allow_failure: false - - name: py310-dj42-mysql-coverage - python: '3.10' - allow_failure: false + # - name: py310-dj42-mysql-coverage + # python: '3.10' + # allow_failure: false - - name: py39-dj42-mysql-xdist-coverage - python: '3.9' - allow_failure: false + # - name: py39-dj42-mysql-xdist-coverage + # python: '3.9' + # allow_failure: false - - name: py313-djmain-sqlite-coverage - python: '3.13' - allow_failure: true + # - name: py313-djmain-sqlite-coverage + # python: '3.13' + # allow_failure: true - name: py313-dj52-sqlite-coverage python: '3.13' @@ -87,9 +87,9 @@ jobs: python: '3.11' allow_failure: false - - name: pypy3-dj42-postgres-coverage - python: 'pypy3.9' - allow_failure: false + # - name: pypy3-dj42-postgres-coverage + # python: 'pypy3.9' + # allow_failure: false steps: - uses: actions/checkout@v4 with: @@ -164,11 +164,11 @@ jobs: - name: Combine coverage reports run: | mkdir combined_coverage_data - find downloaded-coverage-artifacts -type f -name '.coverage.*' -exec cp {} combined_coverage_data/ \; + find downloaded-coverage-artifacts -type f -name 'coverage.*' -exec cp {} combined_coverage_data/ \; echo "Files in combined_coverage_data for combining:" ls -R combined_coverage_data cd combined_coverage_data - coverage combine --keep + coverage combine echo "Combined .coverage file generated. Generating XML report." coverage xml -o ../coverage.xml cd .. From 77a07e2eda2ab18bf7f07826d28765b4584a0fcc Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 13:04:09 -0400 Subject: [PATCH 22/52] Enhance main.yml workflow by refining event triggers and simplifying coverage file handling --- .github/workflows/main.yml | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4c9cd649..b977add7 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,14 @@ name: main -on: [push, pull_request] +on: + push: + branches: + - main + tags: + - "*" + pull_request: + branches: + - "*" concurrency: group: ci-main-${{ github.ref }} @@ -122,10 +130,7 @@ jobs: - name: Prepare coverage file for upload if: contains(matrix.name, 'coverage') - run: | - ls -lash - mv .coverage coverage.${{ matrix.name }} - ls -lash + run: mv .coverage coverage.${{ matrix.name }} - name: Upload temporary coverage artifact if: contains(matrix.name, 'coverage') @@ -167,13 +172,9 @@ jobs: find downloaded-coverage-artifacts -type f -name 'coverage.*' -exec cp {} combined_coverage_data/ \; echo "Files in combined_coverage_data for combining:" ls -R combined_coverage_data - cd combined_coverage_data - coverage combine - echo "Combined .coverage file generated. Generating XML report." - coverage xml -o ../coverage.xml - cd .. - echo "Generated coverage.xml in workspace root:" - ls -l coverage.xml + coverage combine .converge combined_coverage_data/* + coverage xml + ls -lsad - name: Report coverage to Codecov uses: codecov/codecov-action@v5 From ef377e5e69dae1c94d957afd882f5689b2122e3e Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 13:05:14 -0400 Subject: [PATCH 23/52] . --- .github/workflows/main.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b977add7..c91709d4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,8 +7,6 @@ on: tags: - "*" pull_request: - branches: - - "*" concurrency: group: ci-main-${{ github.ref }} From d795df0a6a747e880b1febe69198c94df07db248 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 13:08:30 -0400 Subject: [PATCH 24/52] . --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c91709d4..fd9c930f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -170,7 +170,7 @@ jobs: find downloaded-coverage-artifacts -type f -name 'coverage.*' -exec cp {} combined_coverage_data/ \; echo "Files in combined_coverage_data for combining:" ls -R combined_coverage_data - coverage combine .converge combined_coverage_data/* + coverage combine combined_coverage_data/* coverage xml ls -lsad From 48e6ea91989e9b8609501f7580da94348a3950c1 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 17:46:29 -0400 Subject: [PATCH 25/52] Update pyproject.toml to exclude pytest_django/_version.py from coverage --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 61f2c006..f7de67aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -103,6 +103,9 @@ include = [ "pytest_django_test/*", "tests/*", ] +exclude = [ + "pytest_django/_version.py", +] skip_covered = true exclude_lines = [ "pragma: no cover", From a36659e7b81092bbd51816e8a73d84f30d2d9123 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 18:01:19 -0400 Subject: [PATCH 26/52] Refactor coverage configuration in pyproject.toml to include and omit specific files --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f7de67aa..7ddff77b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,15 +97,15 @@ ignore_missing_imports = true parallel = true source = ["${PYTESTDJANGO_COVERAGE_SRC}."] branch = true +omit = [ + "pytest_django/_version.py", +] [tool.coverage.report] include = [ "pytest_django/*", "pytest_django_test/*", "tests/*", ] -exclude = [ - "pytest_django/_version.py", -] skip_covered = true exclude_lines = [ "pragma: no cover", From 45cb413c18f4333ee3902defa692bd193eedf2eb Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Mon, 26 May 2025 18:11:21 -0400 Subject: [PATCH 27/52] . --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 7ddff77b..f60beafd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,6 +106,9 @@ include = [ "pytest_django_test/*", "tests/*", ] +omit = [ + "pytest_django/_version.py", +] skip_covered = true exclude_lines = [ "pragma: no cover", From 9f9cf83ff92d8e42d5fd03283aaf38200e6ccb68 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 27 May 2025 01:44:59 -0400 Subject: [PATCH 28/52] Update main.yml --- .github/workflows/main.yml | 144 ++++++++++++++++++------------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5745c184..7e231573 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,78 +29,78 @@ jobs: fail-fast: false matrix: include: - - name: linting,docs - python: '3.13' - allow_failure: false - -# # Explicitly test min pytest. -# - name: py313-dj52-sqlite-pytestmin-coverage -# python: '3.13' -# allow_failure: false - - # - name: py313-dj52-postgres-xdist-coverage - # python: '3.13' - # allow_failure: false - - # - name: py313-dj51-postgres-xdist-coverage - # python: '3.13' - # allow_failure: false - - # - name: py312-dj42-postgres-xdist-coverage - # python: '3.12' - # allow_failure: false - - # - name: py311-dj50-postgres-xdist-coverage - # python: '3.11' - # allow_failure: false - - # - name: py311-dj42-postgres-xdist-coverage - # python: '3.11' - # allow_failure: false - - # - name: py310-dj52-postgres-xdist-coverage - # python: '3.10' - # allow_failure: false - - # - name: py310-dj51-postgres-xdist-coverage - # python: '3.10' - # allow_failure: false - - # - name: py310-dj42-postgres-xdist-coverage - # python: '3.10' - # allow_failure: false - - # - name: py311-dj51-mysql-coverage - # python: '3.11' - # allow_failure: false - - # - name: py310-dj42-mysql-coverage - # python: '3.10' - # allow_failure: false - - # - name: py39-dj42-mysql-xdist-coverage - # python: '3.9' - # allow_failure: false - - # - name: py313-djmain-sqlite-coverage - # python: '3.13' - # allow_failure: true - - - name: py313-dj52-sqlite-coverage - python: '3.13' - allow_failure: true - - - name: py312-dj51-sqlite-xdist-coverage - python: '3.12' - allow_failure: false - - - name: py311-dj42-sqlite-xdist-coverage - python: '3.11' - allow_failure: false - - # - name: pypy3-dj42-postgres-coverage - # python: 'pypy3.9' - # allow_failure: false + - name: linting,docs + python: '3.13' + allow_failure: false + + # Explicitly test min pytest. + - name: py313-dj52-sqlite-pytestmin-coverage + python: '3.13' + allow_failure: false + + - name: py313-dj52-postgres-xdist-coverage + python: '3.13' + allow_failure: false + + - name: py313-dj51-postgres-xdist-coverage + python: '3.13' + allow_failure: false + + - name: py312-dj42-postgres-xdist-coverage + python: '3.12' + allow_failure: false + + - name: py311-dj50-postgres-xdist-coverage + python: '3.11' + allow_failure: false + + - name: py311-dj42-postgres-xdist-coverage + python: '3.11' + allow_failure: false + + - name: py310-dj52-postgres-xdist-coverage + python: '3.10' + allow_failure: false + + - name: py310-dj51-postgres-xdist-coverage + python: '3.10' + allow_failure: false + + - name: py310-dj42-postgres-xdist-coverage + python: '3.10' + allow_failure: false + + - name: py311-dj51-mysql-coverage + python: '3.11' + allow_failure: false + + - name: py310-dj42-mysql-coverage + python: '3.10' + allow_failure: false + + - name: py39-dj42-mysql-xdist-coverage + python: '3.9' + allow_failure: false + + - name: py313-djmain-sqlite-coverage + python: '3.13' + allow_failure: true + + - name: py313-dj52-sqlite-coverage + python: '3.13' + allow_failure: true + + - name: py312-dj51-sqlite-xdist-coverage + python: '3.12' + allow_failure: false + + - name: py311-dj42-sqlite-xdist-coverage + python: '3.11' + allow_failure: false + + - name: pypy3-dj42-postgres-coverage + python: 'pypy3.9' + allow_failure: false steps: - uses: actions/checkout@v4 with: From 9bff05a900546ac376d545a604f5d2765a763414 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 27 May 2025 02:11:28 -0400 Subject: [PATCH 29/52] Update main.yml --- .github/workflows/main.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7e231573..7d6b9aff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,73 +32,74 @@ jobs: - name: linting,docs python: '3.13' allow_failure: false - + # Explicitly test min pytest. - name: py313-dj52-sqlite-pytestmin-coverage python: '3.13' allow_failure: false - + - name: py313-dj52-postgres-xdist-coverage python: '3.13' allow_failure: false - + - name: py313-dj51-postgres-xdist-coverage python: '3.13' allow_failure: false - + - name: py312-dj42-postgres-xdist-coverage python: '3.12' allow_failure: false - + - name: py311-dj50-postgres-xdist-coverage python: '3.11' allow_failure: false - + - name: py311-dj42-postgres-xdist-coverage python: '3.11' allow_failure: false - + - name: py310-dj52-postgres-xdist-coverage python: '3.10' allow_failure: false - + - name: py310-dj51-postgres-xdist-coverage python: '3.10' allow_failure: false - + - name: py310-dj42-postgres-xdist-coverage python: '3.10' allow_failure: false - + - name: py311-dj51-mysql-coverage python: '3.11' allow_failure: false - + - name: py310-dj42-mysql-coverage python: '3.10' allow_failure: false - + - name: py39-dj42-mysql-xdist-coverage python: '3.9' allow_failure: false - + - name: py313-djmain-sqlite-coverage python: '3.13' allow_failure: true - + - name: py313-dj52-sqlite-coverage python: '3.13' allow_failure: true - + - name: py312-dj51-sqlite-xdist-coverage python: '3.12' allow_failure: false - + - name: py311-dj42-sqlite-xdist-coverage python: '3.11' allow_failure: false - - - name: pypy3-dj42-postgres-coverage + + # pypy3: not included with coverage reports (much slower then). + - name: pypy3-dj42-postgres python: 'pypy3.9' allow_failure: false steps: From a5d66c7ed7752c8c746741a19ba4d92410c70e9b Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 27 May 2025 02:16:39 -0400 Subject: [PATCH 30/52] Update main.yml --- .github/workflows/main.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7d6b9aff..24a448b6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -159,7 +159,8 @@ jobs: - uses: actions/setup-python@v5 with: - python-version: '3.11' + python-version: '3.13' + check-latest: true - name: Install coverage tool run: python -m pip install coverage[toml] @@ -174,11 +175,8 @@ jobs: run: | mkdir combined_coverage_data find downloaded-coverage-artifacts -type f -name 'coverage.*' -exec cp {} combined_coverage_data/ \; - echo "Files in combined_coverage_data for combining:" - ls -R combined_coverage_data coverage combine combined_coverage_data/* coverage xml - ls -lsad - name: Report coverage to Codecov uses: codecov/codecov-action@v5 @@ -188,7 +186,7 @@ jobs: fail_ci_if_error: true verbose: true - check: + check: # This job does nothing and is only used for the branch protection if: always() needs: From 1ffc476fe0a2b8fae989d008e99a7fe7925ff528 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Tue, 27 May 2025 02:22:24 -0400 Subject: [PATCH 31/52] . --- .github/workflows/main.yml | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 24a448b6..3b81ea1b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -151,7 +151,7 @@ jobs: if: always() permissions: contents: read - actions: read + actions: write steps: - uses: actions/checkout@v4 with: @@ -177,6 +177,27 @@ jobs: find downloaded-coverage-artifacts -type f -name 'coverage.*' -exec cp {} combined_coverage_data/ \; coverage combine combined_coverage_data/* coverage xml + coverage html + + - name: Upload combined .coverage file + uses: actions/upload-artifact@v4 + with: + name: combined-coverage-file + path: .coverage + retention-days: 1 + include-hidden-files: true + + - name: Upload HTML coverage report + uses: actions/upload-artifact@v4 + with: + name: html-coverage-report + path: htmlcov + retention-days: 1 + + - name: Delete temporary coverage artifacts from run + uses: geekyeggo/delete-artifact@v5 + with: + name: coverage-artifact-* - name: Report coverage to Codecov uses: codecov/codecov-action@v5 From 186dcc46de77210461b1642c30efdeed2096c8b1 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Tue, 27 May 2025 02:27:23 -0400 Subject: [PATCH 32/52] Enhance coverage report configuration in main.yml to include markdown output and adjust retention days based on branch or tag. --- .github/workflows/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3b81ea1b..f3149b0c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -178,21 +178,22 @@ jobs: coverage combine combined_coverage_data/* coverage xml coverage html + coverage report --format=markdown >> $GITHUB_STEP_SUMMARY - name: Upload combined .coverage file uses: actions/upload-artifact@v4 with: - name: combined-coverage-file + name: coverage-file path: .coverage - retention-days: 1 + retention-days: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 90 || 3 }} include-hidden-files: true - name: Upload HTML coverage report uses: actions/upload-artifact@v4 with: - name: html-coverage-report + name: coverage-html-report path: htmlcov - retention-days: 1 + retention-days: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 90 || 3 }} - name: Delete temporary coverage artifacts from run uses: geekyeggo/delete-artifact@v5 From e3a6ea1db5c85d9816801ee61be8d14e07911325 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Tue, 27 May 2025 02:33:52 -0400 Subject: [PATCH 33/52] Remove pytest_django/_version.py from coverage omission list in pyproject.toml --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f60beafd..7ddff77b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -106,9 +106,6 @@ include = [ "pytest_django_test/*", "tests/*", ] -omit = [ - "pytest_django/_version.py", -] skip_covered = true exclude_lines = [ "pragma: no cover", From febb65c27edd2adbe0f546e3a54faab205723729 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Tue, 27 May 2025 02:39:34 -0400 Subject: [PATCH 34/52] ..i think copilot led me down the wrong road --- pyproject.toml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7ddff77b..7d16dfe8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,15 +97,18 @@ ignore_missing_imports = true parallel = true source = ["${PYTESTDJANGO_COVERAGE_SRC}."] branch = true -omit = [ - "pytest_django/_version.py", -] +# omit = [ +# "pytest_django/_version.py", +# ] [tool.coverage.report] include = [ "pytest_django/*", "pytest_django_test/*", "tests/*", ] +omit = [ + "pytest_django/_version.py", +] skip_covered = true exclude_lines = [ "pragma: no cover", From a946de141fc8230c1c3e07facf176a12d4948194 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Tue, 27 May 2025 02:43:46 -0400 Subject: [PATCH 35/52] Ok not soo wrong.. --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7d16dfe8..2247e90e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,9 +97,6 @@ ignore_missing_imports = true parallel = true source = ["${PYTESTDJANGO_COVERAGE_SRC}."] branch = true -# omit = [ -# "pytest_django/_version.py", -# ] [tool.coverage.report] include = [ "pytest_django/*", From e38450f21fccde71516c1e3f2d02631aa01006a9 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 27 May 2025 09:46:50 +0200 Subject: [PATCH 36/52] Update main.yml --- .github/workflows/main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f3149b0c..d3531e96 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,7 @@ permissions: {} jobs: test: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 continue-on-error: ${{ matrix.allow_failure }} timeout-minutes: 15 permissions: @@ -146,7 +146,7 @@ jobs: report-coverage: name: Report Combined Coverage - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 needs: test if: always() permissions: @@ -160,7 +160,6 @@ jobs: - uses: actions/setup-python@v5 with: python-version: '3.13' - check-latest: true - name: Install coverage tool run: python -m pip install coverage[toml] @@ -214,7 +213,7 @@ jobs: needs: - report-coverage - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - name: Decide whether the needed jobs succeeded or failed From 917a32625b1c1367d0d6da19563d9f47a3b34d64 Mon Sep 17 00:00:00 2001 From: kingbuzzman Date: Tue, 27 May 2025 08:45:07 -0400 Subject: [PATCH 37/52] Refactor retention days logic in main.yml to use a dedicated step for better clarity and maintainability. --- .github/workflows/main.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3531e96..a2258739 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -179,12 +179,21 @@ jobs: coverage html coverage report --format=markdown >> $GITHUB_STEP_SUMMARY + - name: Determine retention days + id: determine-retention-days + run: | + if [ "${{ github.ref }}" = "refs/heads/main" ] || [[ "${{ github.ref }}" == refs/tags/* ]]; then + echo "retention_days=90" >> $GITHUB_OUTPUT + else + echo "retention_days=3" >> $GITHUB_OUTPUT + fi + - name: Upload combined .coverage file uses: actions/upload-artifact@v4 with: name: coverage-file path: .coverage - retention-days: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 90 || 3 }} + retention-days: ${{ steps.determine-retention-days.outputs.retention_days }} include-hidden-files: true - name: Upload HTML coverage report @@ -192,7 +201,7 @@ jobs: with: name: coverage-html-report path: htmlcov - retention-days: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')) && 90 || 3 }} + retention-days: ${{ steps.determine-retention-days.outputs.retention_days }} - name: Delete temporary coverage artifacts from run uses: geekyeggo/delete-artifact@v5 From 9bcbcd8b3abc20aef1777f8cda9d266e9d38fac0 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 3 Jun 2025 03:52:14 -0400 Subject: [PATCH 38/52] . --- .github/workflows/main.yml | 83 +++++++++++++++++++------------------- 1 file changed, 42 insertions(+), 41 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a2258739..d45aa299 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,48 @@ jobs: timeout-minutes: 15 permissions: contents: read + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + + - name: Setup mysql + if: contains(matrix.name, 'mysql') + run: | + sudo systemctl start mysql.service + echo "TEST_DB_USER=root" >> $GITHUB_ENV + echo "TEST_DB_PASSWORD=root" >> $GITHUB_ENV + + - name: Setup postgresql + if: contains(matrix.name, 'postgres') + run: | + sudo systemctl start postgresql.service + sudo -u postgres createuser --createdb $USER + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox==4.26.0 + + - name: Run tox + run: tox -e ${{ matrix.name }} + + - name: Prepare coverage file for upload + if: contains(matrix.name, 'coverage') + run: mv .coverage coverage.${{ matrix.name }} + + - name: Upload temporary coverage artifact + if: contains(matrix.name, 'coverage') + uses: actions/upload-artifact@v4 + with: + name: coverage-artifact-${{ matrix.name }} + path: coverage.${{ matrix.name }} + retention-days: 1 + strategy: fail-fast: false matrix: @@ -102,47 +144,6 @@ jobs: - name: pypy3-dj42-postgres python: 'pypy3.9' allow_failure: false - steps: - - uses: actions/checkout@v4 - with: - persist-credentials: false - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python }} - - - name: Setup mysql - if: contains(matrix.name, 'mysql') - run: | - sudo systemctl start mysql.service - echo "TEST_DB_USER=root" >> $GITHUB_ENV - echo "TEST_DB_PASSWORD=root" >> $GITHUB_ENV - - - name: Setup postgresql - if: contains(matrix.name, 'postgres') - run: | - sudo systemctl start postgresql.service - sudo -u postgres createuser --createdb $USER - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install tox==4.26.0 - - - name: Run tox - run: tox -e ${{ matrix.name }} - - - name: Prepare coverage file for upload - if: contains(matrix.name, 'coverage') - run: mv .coverage coverage.${{ matrix.name }} - - - name: Upload temporary coverage artifact - if: contains(matrix.name, 'coverage') - uses: actions/upload-artifact@v4 - with: - name: coverage-artifact-${{ matrix.name }} - path: coverage.${{ matrix.name }} - retention-days: 1 report-coverage: name: Report Combined Coverage From 3f519be94c0f03b7e73f6983f0e479429b5414f6 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 3 Jun 2025 03:54:26 -0400 Subject: [PATCH 39/52] . --- .github/workflows/main.yml | 146 ++++++++++++++++++------------------- 1 file changed, 73 insertions(+), 73 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d45aa299..fd2efa80 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -71,79 +71,79 @@ jobs: fail-fast: false matrix: include: - - name: linting,docs - python: '3.13' - allow_failure: false - - # Explicitly test min pytest. - - name: py313-dj52-sqlite-pytestmin-coverage - python: '3.13' - allow_failure: false - - - name: py313-dj52-postgres-xdist-coverage - python: '3.13' - allow_failure: false - - - name: py313-dj51-postgres-xdist-coverage - python: '3.13' - allow_failure: false - - - name: py312-dj42-postgres-xdist-coverage - python: '3.12' - allow_failure: false - - - name: py311-dj50-postgres-xdist-coverage - python: '3.11' - allow_failure: false - - - name: py311-dj42-postgres-xdist-coverage - python: '3.11' - allow_failure: false - - - name: py310-dj52-postgres-xdist-coverage - python: '3.10' - allow_failure: false - - - name: py310-dj51-postgres-xdist-coverage - python: '3.10' - allow_failure: false - - - name: py310-dj42-postgres-xdist-coverage - python: '3.10' - allow_failure: false - - - name: py311-dj51-mysql-coverage - python: '3.11' - allow_failure: false - - - name: py310-dj42-mysql-coverage - python: '3.10' - allow_failure: false - - - name: py39-dj42-mysql-xdist-coverage - python: '3.9' - allow_failure: false - - - name: py313-djmain-sqlite-coverage - python: '3.13' - allow_failure: true - - - name: py313-dj52-sqlite-coverage - python: '3.13' - allow_failure: true - - - name: py312-dj51-sqlite-xdist-coverage - python: '3.12' - allow_failure: false - - - name: py311-dj42-sqlite-xdist-coverage - python: '3.11' - allow_failure: false - - # pypy3: not included with coverage reports (much slower then). - - name: pypy3-dj42-postgres - python: 'pypy3.9' - allow_failure: false + - name: linting,docs + python: '3.13' + allow_failure: false + + # Explicitly test min pytest. + - name: py313-dj52-sqlite-pytestmin-coverage + python: '3.13' + allow_failure: false + + - name: py313-dj52-postgres-xdist-coverage + python: '3.13' + allow_failure: false + + - name: py313-dj51-postgres-xdist-coverage + python: '3.13' + allow_failure: false + + - name: py312-dj42-postgres-xdist-coverage + python: '3.12' + allow_failure: false + + - name: py311-dj50-postgres-xdist-coverage + python: '3.11' + allow_failure: false + + - name: py311-dj42-postgres-xdist-coverage + python: '3.11' + allow_failure: false + + - name: py310-dj52-postgres-xdist-coverage + python: '3.10' + allow_failure: false + + - name: py310-dj51-postgres-xdist-coverage + python: '3.10' + allow_failure: false + + - name: py310-dj42-postgres-xdist-coverage + python: '3.10' + allow_failure: false + + - name: py311-dj51-mysql-coverage + python: '3.11' + allow_failure: false + + - name: py310-dj42-mysql-coverage + python: '3.10' + allow_failure: false + + - name: py39-dj42-mysql-xdist-coverage + python: '3.9' + allow_failure: false + + - name: py313-djmain-sqlite-coverage + python: '3.13' + allow_failure: true + + - name: py313-dj52-sqlite-coverage + python: '3.13' + allow_failure: true + + - name: py312-dj51-sqlite-xdist-coverage + python: '3.12' + allow_failure: false + + - name: py311-dj42-sqlite-xdist-coverage + python: '3.11' + allow_failure: false + + # pypy3: not included with coverage reports (much slower then). + - name: pypy3-dj42-postgres + python: 'pypy3.9' + allow_failure: false report-coverage: name: Report Combined Coverage From 78e77c688ee0d24ac3cfd7922ab00ecaa37256e6 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 3 Jun 2025 06:09:16 -0400 Subject: [PATCH 40/52] zizmor changes --- .github/workflows/main.yml | 10 ++++++---- .github/zizmor.yml | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6147c438..2a6f29af 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -25,6 +25,8 @@ jobs: timeout-minutes: 15 permissions: contents: read + env: + MATRIX_NAME: ${{ matrix.name }} steps: - uses: actions/checkout@v4 with: @@ -54,12 +56,10 @@ jobs: - name: Run tox run: tox -e "${MATRIX_NAME}" - env: - MATRIX_NAME: ${{ matrix.name }} - name: Prepare coverage file for upload if: contains(matrix.name, 'coverage') - run: mv .coverage coverage.${{ matrix.name }} + run: mv .coverage coverage.${MATRIX_NAME} - name: Upload temporary coverage artifact if: contains(matrix.name, 'coverage') @@ -185,11 +185,13 @@ jobs: - name: Determine retention days id: determine-retention-days run: | - if [ "${{ github.ref }}" = "refs/heads/main" ] || [[ "${{ github.ref }}" == refs/tags/* ]]; then + if [ "${GITHUB_REF}" = "refs/heads/main" ] || [[ "${GITHUB_REF}" == refs/tags/* ]]; then echo "retention_days=90" >> $GITHUB_OUTPUT else echo "retention_days=3" >> $GITHUB_OUTPUT fi + env: + GITHUB_REF: ${{ github.ref }} - name: Upload combined .coverage file uses: actions/upload-artifact@v4 diff --git a/.github/zizmor.yml b/.github/zizmor.yml index 2ed61128..1a2520ac 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -4,3 +4,4 @@ rules: policies: actions/*: ref-pin codecov/codecov-action: ref-pin + geekyeggo/delete-artifact: ref-pin From f8f4e3f08467655019c391d791426ab47a07dcb7 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 3 Jun 2025 12:14:31 +0200 Subject: [PATCH 41/52] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a6f29af..90c85ba6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -180,7 +180,7 @@ jobs: coverage combine combined_coverage_data/* coverage xml coverage html - coverage report --format=markdown >> $GITHUB_STEP_SUMMARY + coverage report --show-missing --format=markdown >> $GITHUB_STEP_SUMMARY - name: Determine retention days id: determine-retention-days From e18821090c2f1c946268d7acac73b40e897f412e Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Tue, 3 Jun 2025 13:45:23 +0200 Subject: [PATCH 42/52] Update pyproject.toml --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 79632eb6..dc93b5b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,8 +118,6 @@ branch = true [tool.coverage.report] include = [ "pytest_django/*", - "pytest_django_test/*", - "tests/*", ] omit = [ "pytest_django/_version.py", From dfbc2ebac5443110d9f0e1ee338e0fd11b0adb0f Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 07:28:06 +0200 Subject: [PATCH 43/52] Update .github/zizmor.yml --- .github/zizmor.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/zizmor.yml b/.github/zizmor.yml index 1a2520ac..2ed61128 100644 --- a/.github/zizmor.yml +++ b/.github/zizmor.yml @@ -4,4 +4,3 @@ rules: policies: actions/*: ref-pin codecov/codecov-action: ref-pin - geekyeggo/delete-artifact: ref-pin From 3faf64b51f9b3fbc0b8b1a2da58bc9597bb3f3ad Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 07:31:09 +0200 Subject: [PATCH 44/52] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 90c85ba6..cc796b00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -209,7 +209,7 @@ jobs: retention-days: ${{ steps.determine-retention-days.outputs.retention_days }} - name: Delete temporary coverage artifacts from run - uses: geekyeggo/delete-artifact@v5 + uses: geekyeggo/delete-artifact@f275313 # 5.1.0 with: name: coverage-artifact-* From 6e8b318bd7c16b196ea7a12faf84051a61fa38f9 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 07:36:48 +0200 Subject: [PATCH 45/52] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cc796b00..e7893e11 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -209,7 +209,7 @@ jobs: retention-days: ${{ steps.determine-retention-days.outputs.retention_days }} - name: Delete temporary coverage artifacts from run - uses: geekyeggo/delete-artifact@f275313 # 5.1.0 + uses: geekyeggo/delete-artifact@ f275313e70c08f6120db482d7a6b98377786765b # 5.1.0 with: name: coverage-artifact-* From 9958235943f8bef04214243e3682fc2016780043 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 07:37:28 +0200 Subject: [PATCH 46/52] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e7893e11..e12ecb98 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -209,7 +209,7 @@ jobs: retention-days: ${{ steps.determine-retention-days.outputs.retention_days }} - name: Delete temporary coverage artifacts from run - uses: geekyeggo/delete-artifact@ f275313e70c08f6120db482d7a6b98377786765b # 5.1.0 + uses: geekyeggo/delete-artifact@f275313e70c08f6120db482d7a6b98377786765b # 5.1.0 with: name: coverage-artifact-* From 595b61eb55ac59d26ce370397f1f7326284f2922 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 08:40:36 -0400 Subject: [PATCH 47/52] Update pyproject.toml --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index dc93b5b1..79632eb6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -118,6 +118,8 @@ branch = true [tool.coverage.report] include = [ "pytest_django/*", + "pytest_django_test/*", + "tests/*", ] omit = [ "pytest_django/_version.py", From c0c749468824d1bed804631ae893c92dcaad468e Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 08:44:07 -0400 Subject: [PATCH 48/52] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 79632eb6..33559ed6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,7 @@ include = [ "tests/*", ] omit = [ - "pytest_django/_version.py", + "pytest_django/_version.py", # coverage fails when the file stops existing randomly, see .gitnore ] skip_covered = true exclude_lines = [ From f9004d38d7fa97acdb74713c77b3f83d6d262299 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 08:44:42 -0400 Subject: [PATCH 49/52] Update pyproject.toml --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 33559ed6..29acbf43 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -122,7 +122,7 @@ include = [ "tests/*", ] omit = [ - "pytest_django/_version.py", # coverage fails when the file stops existing randomly, see .gitnore + "pytest_django/_version.py", # coverage fails when the file stops existing randomly, see .gitignore ] skip_covered = true exclude_lines = [ From 7eb83caf771efa9219b6b933318284efe7a99bba Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 08:46:15 -0400 Subject: [PATCH 50/52] Update .github/workflows/main.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff1f4f01..c0a6fdba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -26,7 +26,7 @@ jobs: permissions: contents: read env: - MATRIX_NAME: ${{ matrix.name }} + TOXENV: ${{ matrix.name }} steps: - uses: actions/checkout@v4 with: From 764ae23ef9453cbf9adeadea0809f0dc843a3aa1 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 08:46:46 -0400 Subject: [PATCH 51/52] Update .github/workflows/main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c0a6fdba..77c5204f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -55,7 +55,7 @@ jobs: pip install tox==4.26.0 - name: Run tox - run: tox -e "${MATRIX_NAME}" + run: tox - name: Prepare coverage file for upload if: contains(matrix.name, 'coverage') From 1b90774df7c2b1fa1dc71e25a03bcc8774a67dd2 Mon Sep 17 00:00:00 2001 From: Javier Buzzi Date: Wed, 4 Jun 2025 08:50:55 -0400 Subject: [PATCH 52/52] Update .github/workflows/main.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 77c5204f..8268c3ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,7 @@ jobs: - name: Prepare coverage file for upload if: contains(matrix.name, 'coverage') - run: mv .coverage coverage.${MATRIX_NAME} + run: mv .coverage coverage.${TOXENV} - name: Upload temporary coverage artifact if: contains(matrix.name, 'coverage')