From a3de3fd433a9166e7a8ee89a309668ae9f8206de Mon Sep 17 00:00:00 2001 From: anish-mudaraddi Date: Tue, 10 Dec 2024 16:05:52 +0000 Subject: [PATCH] Add codecov add code-coverage utility --- .github/workflows/unittest.yml | 8 +++++++- requirements.txt | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml index e4a3383..a39af26 100644 --- a/.github/workflows/unittest.yml +++ b/.github/workflows/unittest.yml @@ -26,4 +26,10 @@ jobs: - name: run tests using pytest run: | - cd $GITHUB_WORKSPACE && pytest + cd $GITHUB_WORKSPACE && pytest --cov --cov-report xml:coverage.xml + + - name: Submit Coverage + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + token: ${{secrets.CODECOV_TOKEN}} diff --git a/requirements.txt b/requirements.txt index 418e4f7..e7a3c1e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,5 @@ pytest +pytest-cov pylint openstacksdk pre-commit