diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 25a44ee..5bcaf3e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -74,6 +74,11 @@ jobs: FRONTEND_HOST: 'https://dev.merch.ntuscse.com' BASE_API_SERVER_URL: 'https://api.dev.ntuscse.com' + + - name: Pytest coverage comment + uses: MishaKav/pytest-coverage-comment@main + with: + pytest-xml-coverage-path: ./coverage.xml lint: runs-on: ubuntu-latest diff --git a/.gitignore b/.gitignore index c04129a..7f2f04b 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,14 @@ node_modules/ out/ docs_server/swagger/openapi.json +#env vars .env.* -/.coverage + +# pytest /.pytest_cache/ + +# test coverage +/.coverage /coverage_html/ /coverage.lcov +/coverage.xml diff --git a/pytest.ini b/pytest.ini index e43d4c1..8d6b9df 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,7 +3,7 @@ env_files = .env .env.test .env.local -addopts = --cov=be --cov-report lcov --cov-report html:coverage_html +addopts = --cov=be --cov-report lcov --cov-report html:coverage_html --cov-report xml:coverage.xml [pytest-watch] beforerun = ./utils/setup_tests.py