From 5c0ad7f07829549c46a0c4e537fd57394c6a1ac2 Mon Sep 17 00:00:00 2001 From: mjwen Date: Fri, 23 Feb 2024 16:09:00 -0600 Subject: [PATCH 1/3] Add codecov to testing.yml --- .github/workflows/testing.yml | 8 +++++++- setup.py | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 137fe4af..56c5ad02 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -62,4 +62,10 @@ jobs: shell: bash -el {0} run: | cd tests - pytest + pytest --cov=kliff --cov-report=xml + + - uses: codecov/codecov-action@v4 + if: matrix.python-version == "3.10" && github.repository == "openkim/kliff" + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml diff --git a/setup.py b/setup.py index 77c3a491..1e627542 100644 --- a/setup.py +++ b/setup.py @@ -104,6 +104,7 @@ def get_readme(): extras_require={ "test": [ "pytest", + "pytest-cov", "kimpy", "emcee", "ptemcee", From 61f18d2a9faca2fbb8b2086195c2c852ac88c8a2 Mon Sep 17 00:00:00 2001 From: mjwen Date: Fri, 23 Feb 2024 16:10:58 -0600 Subject: [PATCH 2/3] Fix quotes --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 56c5ad02..ec35bd85 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -65,7 +65,7 @@ jobs: pytest --cov=kliff --cov-report=xml - uses: codecov/codecov-action@v4 - if: matrix.python-version == "3.10" && github.repository == "openkim/kliff" + if: matrix.python-version == '3.10' && github.repository == 'openkim/kliff' with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml From b64d8e98b56112376e603c69af36c448f94b9214 Mon Sep 17 00:00:00 2001 From: mjwen Date: Fri, 23 Feb 2024 16:13:59 -0600 Subject: [PATCH 3/3] Upload codecov only on ubuntu --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ec35bd85..bf84452f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -65,7 +65,7 @@ jobs: pytest --cov=kliff --cov-report=xml - uses: codecov/codecov-action@v4 - if: matrix.python-version == '3.10' && github.repository == 'openkim/kliff' + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' && github.repository == 'openkim/kliff' with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml