diff --git a/.github/workflows/build_lint_test.yaml b/.github/workflows/build_lint_test.yaml index f8eeabff..618717e1 100644 --- a/.github/workflows/build_lint_test.yaml +++ b/.github/workflows/build_lint_test.yaml @@ -28,4 +28,8 @@ jobs: ./tools/linter check - name: Run tests with coverage run: | - ./tools/test + ./tools/test xml + - name: Upload code coverage to codecov.io + uses: codecov/codecov-action@v3 + with: + files: ./coverage.xml \ No newline at end of file diff --git a/tools/test b/tools/test index 06ceb188..445b441c 100755 --- a/tools/test +++ b/tools/test @@ -1,7 +1,9 @@ # Run within root directory if [[ $1 = "html" ]]; then - coverage run -m pytest && coverage html + coverage run -m pytest && coverage report && coverage html +elif [[ $1 = "xml" ]]; then + coverage run -m pytest && coverage report && coverage xml elif [[ $1 = "unit" ]]; then coverage run -m pytest tests/unit && coverage report else