From 5cb7ce21472879bcd56cb36dfa3f05bf45a7e792 Mon Sep 17 00:00:00 2001 From: gangatp Date: Fri, 15 Dec 2023 13:57:38 +0530 Subject: [PATCH] fixing code coverage --- .github/workflows/build.yml | 4 ++-- Tests/codecoverage/run_codecoverage.sh | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6d6c68d30..4c656d8ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,11 +61,11 @@ jobs: name: codecoverage.zip path: build/codecoverage.zip - name: Upload code coverage to codecov - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./build/Test_CPP_Bindings_filtered.info - fail_ci_if_error: false # optional (default = false) + fail_ci_if_error: true # optional (default = false) verbose: true # optional (default = false) build-windows-release: diff --git a/Tests/codecoverage/run_codecoverage.sh b/Tests/codecoverage/run_codecoverage.sh index 0dde21647..d95c8ede7 100755 --- a/Tests/codecoverage/run_codecoverage.sh +++ b/Tests/codecoverage/run_codecoverage.sh @@ -1,23 +1,22 @@ cd build -lcov --capture --initial --directory . --output-file Test_CPP_Bindings_base.info - +lcov --capture --initial --directory . --output-file Test_CPP_Bindings_base.info --ignore-errors gcov,inconsistent ./Test_CPP_Bindings -lcov --directory . --capture --output-file Test_CPP_Bindings_run.info -lcov --add-tracefile Test_CPP_Bindings_base.info --add-tracefile Test_CPP_Bindings_run.info --output-file Test_CPP_Bindings.info +lcov --directory . --capture --output-file Test_CPP_Bindings_run.info --ignore-errors gcov,inconsistent +lcov --add-tracefile Test_CPP_Bindings_base.info --add-tracefile Test_CPP_Bindings_run.info --output-file Test_CPP_Bindings.info --ignore-errors gcov,inconsistent TARGETDIR=`dirname \`pwd\`` -lcov --remove Test_CPP_Bindings.info -o Test_CPP_Bindings_filtered.info "$TARGETDIR/Tests/*" "$TARGETDIR/Source/Libraries/*" "$TARGETDIR/Include/Libraries/*" "/Applications/*" \ +lcov --remove Test_CPP_Bindings.info --ignore-errors inconsistent -o Test_CPP_Bindings_filtered.info "$TARGETDIR/Tests/*" "$TARGETDIR/Source/Libraries/*" "$TARGETDIR/Include/Libraries/*" "/Applications/*" \ "$TARGETDIR/Autogenerated/Bindings/C/*" \ "$TARGETDIR/Autogenerated/Bindings/CDynamic/*" \ "$TARGETDIR/Autogenerated/Bindings/CSharp/*" \ "$TARGETDIR/Autogenerated/Bindings/CppDynamic/*" \ "$TARGETDIR/Autogenerated/Bindings/Go/*" \ "$TARGETDIR/Autogenerated/Bindings/NodeJS/*" \ - "$TARGETDIR/Autogenerated/Bindings/Python/*" + "$TARGETDIR/Autogenerated/Bindings/Python/*" -genhtml --output-directory ./codecoverage --title "lib3mf Test Coverage" --function-coverage --legend Test_CPP_Bindings_filtered.info +genhtml --output-directory ./codecoverage --title "lib3mf Test Coverage" --function-coverage --legend Test_CPP_Bindings_filtered.info --ignore-errors inconsistent zip -r codecoverage.zip ./codecoverage/