From e6f3181c053c009017a95355721525dc502c5d35 Mon Sep 17 00:00:00 2001 From: Patrick Avery Date: Mon, 20 Jun 2022 19:20:32 -0500 Subject: [PATCH] docs(ci): add coverage and codecov upload Signed-off-by: Patrick Avery --- .codecov.yml | 4 ++++ .github/workflows/test_and_release.yml | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .codecov.yml diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 00000000..5dd21786 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1,4 @@ +coverage: + status: + project: off + patch: off \ No newline at end of file diff --git a/.github/workflows/test_and_release.yml b/.github/workflows/test_and_release.yml index 5784411f..ceb9410f 100644 --- a/.github/workflows/test_and_release.yml +++ b/.github/workflows/test_and_release.yml @@ -60,7 +60,14 @@ jobs: run: | pip install . pip install -r tests/requirements.txt - pytest -s ./tests + # Run the tests with coverage so we get a coverage report too + pip install coverage + coverage run --source . -m pytest . + # Print the coverage report + coverage report -m + + - name: Upload Coverage to Codecov + uses: codecov/codecov-action@v3 check-and-lint: runs-on: ubuntu-latest