From 00fbd0e94b535e09205dee60d4b9932dbe903b63 Mon Sep 17 00:00:00 2001 From: mbooz Date: Wed, 17 Jun 2026 17:00:54 -0400 Subject: [PATCH] Onboard test coverage to Codecov Update cov-ci testenv to generate coverage.xml report Adds the codecov action to the CI workflow --- .github/workflows/ci.yml | 11 +++++++++++ tox.ini | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 195a344a..607b158b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,9 @@ on: jobs: run-ci: runs-on: ubuntu-latest + # Required for OIDC: https://github.com/codecov/codecov-action?tab=readme-ov-file#using-oidc + permissions: + id-token: write steps: - uses: actions/checkout@v6 @@ -30,6 +33,14 @@ jobs: - name: Run auto-tests run: tox -e cov-ci + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + use_oidc: true + flags: unit-tests + files: coverage.xml + fail_ci_if_error: false + - name: Run static analysis run: tox -e static diff --git a/tox.ini b/tox.ini index 31813796..839ba13b 100644 --- a/tox.ini +++ b/tox.ini @@ -22,7 +22,7 @@ commands= [testenv:cov-ci] usedevelop=true commands= - pytest --cov-fail-under=100 --cov=exodus_lambda {posargs} + pytest --cov-fail-under=100 --cov=exodus_lambda --cov-report=xml {posargs} [testenv:bandit] usedevelop=true