From 72dfad59ab2838b1446a3419b2b1a88bbcd5d66f Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Tue, 20 Aug 2024 23:57:01 +0100 Subject: [PATCH] Upload junit to codecov (#8800) (cherry picked from commit 17bf912743708b18cc4737182a2c2e286c312f4d) --- .github/workflows/ci-cd.yml | 8 +++++++- setup.cfg | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index d422a269f02..bb4df9b7760 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -196,7 +196,7 @@ jobs: PIP_USER: 1 run: >- PATH="${HOME}/Library/Python/3.11/bin:${HOME}/.local/bin:${PATH}" - pytest + pytest --junitxml=junit.xml shell: bash - name: Re-run the failing tests with maximum verbosity if: failure() @@ -232,6 +232,12 @@ jobs: steps.python-install.outputs.python-version }} token: ${{ secrets.CODECOV_TOKEN }} + - name: Upload test results to Codecov + if: ${{ !cancelled() }} + uses: codecov/test-results-action@v1 + with: + fail_ci_if_error: true + token: ${{ secrets.CODECOV_TOKEN }} check: # This job does nothing and is only used for the branch protection if: always() diff --git a/setup.cfg b/setup.cfg index 03fb594ecbe..4000b5a40a7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -167,7 +167,6 @@ junit_suite_name = aiohttp_test_suite norecursedirs = dist docs build .tox .eggs minversion = 3.8.2 testpaths = tests/ -junit_family=xunit2 xfail_strict = true markers = dev_mode: mark test to run in dev mode.