From b740ea052efcef8e047218afd731414c38f207b1 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Mon, 26 May 2025 12:27:05 -0400 Subject: [PATCH 1/2] Attempt at fixing Codecov coverage analysis --- .github/workflows/tests.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 1b6197f5..6d2f858b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -41,6 +41,22 @@ jobs: - name: Run isolated tests run: uv run inv pytest --junit --no-pty --isolated - - name: Upload coverage reports to Codecov with GitHub Action on Python 3.13 for each OS - uses: codecov/codecov-action@v3 - if: ${{ matrix.python-version == '3.13' }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + files: ./junit.xml,!./cache + flags: python${{ matrix.python-version }} + name: codecov-umbrella-test-results + token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + directory: ./coverage/reports/ + env_vars: OS,PYTHON + fail_ci_if_error: true + files: ./coverage1.xml,./coverage2.xml,!./cache + flags: unittests + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true From fad24b57a62172713790832596d349adfc5f4727 Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Mon, 26 May 2025 12:55:40 -0400 Subject: [PATCH 2/2] Try to fix coverage --- .github/workflows/tests.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8182001b..a103561d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,26 +36,23 @@ jobs: run: uv sync --all-extras --dev - name: Run tests - run: uv run inv pytest --junit --no-pty --base + run: uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests - name: Run isolated tests - run: uv run inv pytest --junit --no-pty --isolated + run: uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated - name: Upload test results to Codecov if: ${{ !cancelled() }} uses: codecov/test-results-action@v1 with: - files: ./junit.xml,!./cache flags: python${{ matrix.python-version }} name: codecov-umbrella-test-results token: ${{ secrets.CODECOV_TOKEN }} - name: Upload coverage to Codecov uses: codecov/codecov-action@v5 with: - directory: ./coverage/reports/ env_vars: OS,PYTHON fail_ci_if_error: true - files: ./coverage1.xml,./coverage2.xml,!./cache flags: unittests name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }}