From 8339a13f000b49da86faa0415ddcaad222a6dcd8 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Mon, 4 Mar 2024 19:26:39 +0100 Subject: [PATCH] GitHub Actions: Upgrade to codecov v4 --- .github/workflows/tests.yml | 11 ++++++----- pyproject.toml | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0a96194..3419b2d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -31,13 +31,14 @@ jobs: if: matrix.optional-dependencies == 'optional-deps' run: pip install -e .[optional] - name: Run tests and generate coverage report - run: coverage run + run: pytest --cov=./ --cov-report=xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v4 with: env_vars: OS,PYTHON,DJANGO - name: codecov-umbrella + exclude: ./setup.py fail_ci_if_error: true + files: ./coverage.xml + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} verbose: true diff --git a/pyproject.toml b/pyproject.toml index 73bcbd5..85c9fde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ "django-phonenumber-field[phonenumbers]", "psycopg2-binary", ] - test = ["coverage", "pytest", "pytest-icdiff", "requests-mock"] + test = ["coverage", "pytest", "pytest-cov", "pytest-icdiff", "requests-mock"] [tool.setuptools.dynamic] version = { attr = "sphinxcontrib_django.__version__" }