From 5296bd4b8f2109cad398d1ca62e1c7097cf11020 Mon Sep 17 00:00:00 2001 From: RobPasMue Date: Thu, 7 Apr 2022 08:13:26 +0200 Subject: [PATCH 1/4] Take into account the .coveragerc file --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 95e79d8cf1d1..a236e2d39e61 100644 --- a/Makefile +++ b/Makefile @@ -27,4 +27,4 @@ test-import: unittest: @echo "Running unittest" @pip install -r requirements_test.txt - @pytest -v --cov=ansys.fluent --cov-report=term + @pytest -v -cov=ansys.fluent --cov-report=term --cov-config=.coveragerc From fa4aeabcefb935344206c0f8c0c2b0f82a1a5f3e Mon Sep 17 00:00:00 2001 From: RobPasMue Date: Thu, 7 Apr 2022 08:14:15 +0200 Subject: [PATCH 2/4] Generate HTML report for coverage --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index a236e2d39e61..88ba2e953329 100644 --- a/Makefile +++ b/Makefile @@ -27,4 +27,4 @@ test-import: unittest: @echo "Running unittest" @pip install -r requirements_test.txt - @pytest -v -cov=ansys.fluent --cov-report=term --cov-config=.coveragerc + @pytest -v -cov=ansys.fluent --cov-report html:cov_html --cov-config=.coveragerc From d96019594f018eba478a802e7c250af8b2db16d6 Mon Sep 17 00:00:00 2001 From: RobPasMue Date: Thu, 7 Apr 2022 08:14:31 +0200 Subject: [PATCH 3/4] Upload Coverage report as an artifact --- .github/workflows/ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2825022a0164..107990d88cc7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,6 +187,13 @@ jobs: - name: Unit Testing run: make unittest + - name: Upload Coverage Results + uses: actions/upload-artifact@v2 + with: + name: HTML-Coverage + path: cov_html + retention-days: 7 + - name: Check package run: | pip install twine From 54154f1af450f797364beaff1180703f207d981e Mon Sep 17 00:00:00 2001 From: RobPasMue Date: Thu, 7 Apr 2022 08:35:46 +0200 Subject: [PATCH 4/4] Missing dash causing pytest not to generate HTML report --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 88ba2e953329..94b0f1e3eb83 100644 --- a/Makefile +++ b/Makefile @@ -27,4 +27,4 @@ test-import: unittest: @echo "Running unittest" @pip install -r requirements_test.txt - @pytest -v -cov=ansys.fluent --cov-report html:cov_html --cov-config=.coveragerc + @pytest -v --cov=ansys.fluent --cov-report html:cov_html --cov-config=.coveragerc