diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..f894cec --- /dev/null +++ b/.coveragerc @@ -0,0 +1,6 @@ +[run] +omit = uprotocol/proto/*, uprotocol/cloudevent/*_pb2.py, tests/*, */__init__.py +[report] +exclude_lines = + pragma: no cover + .*pass.* \ No newline at end of file diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 085f543..adb88f1 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -40,7 +40,7 @@ jobs: - name: Run tests with coverage run: | - poetry run coverage run --source=uprotocol --omit=uprotocol/proto/*,uprotocol/cloudevent/*_pb2.py,tests/*,*/__init__.py -m pytest + poetry run coverage run --source=uprotocol -m pytest poetry run coverage report > coverage_report.txt export COVERAGE_PERCENTAGE=$(awk '/TOTAL/{print $4}' coverage_report.txt) echo "COVERAGE_PERCENTAGE=$COVERAGE_PERCENTAGE" >> $GITHUB_ENV