diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index da6d70e..ec7af40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -23,7 +23,7 @@ jobs: shell: bash run: | apt -y update - apt install -y python3-venv + apt install -y python3-venv curl python -m venv venv source venv/bin/activate @@ -38,4 +38,10 @@ jobs: - name: Test shell: bash - run: pytest -rs tests + run: pytest --cov=openmc_mcnp_adapter --cov-branch --cov-report=xml -rs tests + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: openmc-dev/openmc_mcnp_adapter diff --git a/pyproject.toml b/pyproject.toml index 017efb2..dd5a130 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -33,7 +33,7 @@ classifiers = [ ] [project.optional-dependencies] -test = ["pytest"] +test = ["pytest", "pytest-cov"] [project.urls] "Bug Tracker" = "https://github.com/openmc-dev/openmc_mcnp_adapter/issues" diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29