From ac8efe1329fc1fdab8a4ebc2624324da421b0ded Mon Sep 17 00:00:00 2001 From: aleguy02 Date: Wed, 1 Oct 2025 23:51:25 -0400 Subject: [PATCH 1/8] update codecov token --- codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index c37e5ec4a09..ec2195eff72 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,7 +2,7 @@ --- codecov: - token: 1eca3b1f-31a2-4fb8-a8c3-138b441b50a7 #repo token + token: 7326df64-df70-4681-ac10-e7eee7a39bd3 #repo token coverage: status: From 59a49f59a513bbcc63a98ce2806ab721c5af3edf Mon Sep 17 00:00:00 2001 From: aleguy02 Date: Thu, 2 Oct 2025 00:24:17 -0400 Subject: [PATCH 2/8] Add upload junit to codecov from CI --- .github/workflows/test.yml | 11 +++++++++++ tox.ini | 5 +++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de40c8a10e2..fd419ddbfcc 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -277,11 +277,15 @@ jobs: - name: Test without coverage if: "! matrix.use_coverage" shell: bash + env: + JUNIT_XML_PATH: junit-${{ matrix.name }}.xml run: tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz` - name: Test with coverage if: "matrix.use_coverage" shell: bash + env: + JUNIT_XML_PATH: junit-${{ matrix.name }}.xml run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz` - name: Upload coverage to Codecov @@ -292,6 +296,13 @@ jobs: files: ./coverage.xml verbose: true + - name: Upload JUnit report to Codecov + uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 + with: + fail_ci_if_error: false + files: junit-${{ matrix.name }}.xml + verbose: true + check: # This job does nothing and is only used for the branch protection if: always() diff --git a/tox.ini b/tox.ini index 35f337cdc71..357deea3355 100644 --- a/tox.ini +++ b/tox.ini @@ -61,8 +61,8 @@ description = under `{basepython}` doctesting: including doctests commands = - {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} - doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest + {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} --junitxml={env:JUNIT_XML_PATH} + doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest --junitxml={env:JUNIT_XML_PATH} coverage: coverage combine coverage: coverage report -m # Run `coverage xml` only on CI. @@ -72,6 +72,7 @@ passenv = PYTEST_ADDOPTS TERM CI + JUNIT_XML_PATH setenv = _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:} From 3fec23023619274a868edf799b20865e44102a2f Mon Sep 17 00:00:00 2001 From: aleguy02 Date: Thu, 2 Oct 2025 00:56:05 -0400 Subject: [PATCH 3/8] Specify upload type --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fd419ddbfcc..44fc582facf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -301,6 +301,7 @@ jobs: with: fail_ci_if_error: false files: junit-${{ matrix.name }}.xml + report_type: test_results verbose: true check: # This job does nothing and is only used for the branch protection From c5d3ae429349f65c58e80b08ea3ad6a73c107530 Mon Sep 17 00:00:00 2001 From: aleguy02 Date: Thu, 2 Oct 2025 02:12:14 -0400 Subject: [PATCH 4/8] add name to AUTHORS --- AUTHORS | 1 + 1 file changed, 1 insertion(+) diff --git a/AUTHORS b/AUTHORS index a089ca678f7..6f292256ff1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -14,6 +14,7 @@ Ahn Ki-Wook Akhilesh Ramakrishnan Akiomi Kamakura Alan Velasco +Alejandro Villate Alessio Izzo Alex Jones Alex Lambson From 3d7b3259f5bc2e9f7b564d7d846e10d21dbfa21e Mon Sep 17 00:00:00 2001 From: aleguy02 Date: Thu, 2 Oct 2025 02:43:36 -0400 Subject: [PATCH 5/8] restore codecov token --- codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index ec2195eff72..c37e5ec4a09 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,7 +2,7 @@ --- codecov: - token: 7326df64-df70-4681-ac10-e7eee7a39bd3 #repo token + token: 1eca3b1f-31a2-4fb8-a8c3-138b441b50a7 #repo token coverage: status: From 64b9635e9952c5ad40e0dcff6b21d82c4b5283ae Mon Sep 17 00:00:00 2001 From: Alejandro Villate <145073504+aleguy02@users.noreply.github.com> Date: Sat, 22 Nov 2025 13:00:53 -0500 Subject: [PATCH 6/8] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pass entire CLI flag in workflow Co-authored-by: 🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) --- .github/workflows/test.yml | 4 ++-- tox.ini | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 44fc582facf..74fac592ed4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -278,14 +278,14 @@ jobs: if: "! matrix.use_coverage" shell: bash env: - JUNIT_XML_PATH: junit-${{ matrix.name }}.xml + _PYTEST_TOX_POSARGS_JUNIT: --junitxml=junit-${{ matrix.name }}.xml run: tox run -e ${{ matrix.tox_env }} --installpkg `find dist/*.tar.gz` - name: Test with coverage if: "matrix.use_coverage" shell: bash env: - JUNIT_XML_PATH: junit-${{ matrix.name }}.xml + _PYTEST_TOX_POSARGS_JUNIT: --junitxml=junit-${{ matrix.name }}.xml run: tox run -e ${{ matrix.tox_env }}-coverage --installpkg `find dist/*.tar.gz` - name: Upload coverage to Codecov diff --git a/tox.ini b/tox.ini index 357deea3355..5a8fa240898 100644 --- a/tox.ini +++ b/tox.ini @@ -61,8 +61,8 @@ description = under `{basepython}` doctesting: including doctests commands = - {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} --junitxml={env:JUNIT_XML_PATH} - doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest --junitxml={env:JUNIT_XML_PATH} + {env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}} + doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules {env:_PYTEST_TOX_POSARGS_JUNIT:} --pyargs _pytest coverage: coverage combine coverage: coverage report -m # Run `coverage xml` only on CI. @@ -72,9 +72,8 @@ passenv = PYTEST_ADDOPTS TERM CI - JUNIT_XML_PATH setenv = - _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:} + _PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_JUNIT:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:} # See https://docs.python.org/3/library/io.html#io-encoding-warning # If we don't enable this, neither can any of our downstream users! From 8f484d27e8c527027c93756ccfb80feddda93829 Mon Sep 17 00:00:00 2001 From: aleguy02 Date: Sat, 22 Nov 2025 13:09:14 -0500 Subject: [PATCH 7/8] add changelog file --- changelog/12689.contrib.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog/12689.contrib.rst diff --git a/changelog/12689.contrib.rst b/changelog/12689.contrib.rst new file mode 100644 index 00000000000..e535b008ac7 --- /dev/null +++ b/changelog/12689.contrib.rst @@ -0,0 +1 @@ +automated uploading JUnit reports to codecov in the test workflow with codecov GitHub Action \ No newline at end of file From 6af094ba88d140d9812fd5445c62a5561259b239 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 22 Nov 2025 18:09:38 +0000 Subject: [PATCH 8/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- changelog/12689.contrib.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/12689.contrib.rst b/changelog/12689.contrib.rst index e535b008ac7..78cacc0d828 100644 --- a/changelog/12689.contrib.rst +++ b/changelog/12689.contrib.rst @@ -1 +1 @@ -automated uploading JUnit reports to codecov in the test workflow with codecov GitHub Action \ No newline at end of file +automated uploading JUnit reports to codecov in the test workflow with codecov GitHub Action