diff --git a/.github/workflows/tests_unit.yml b/.github/workflows/tests_unit.yml index 05788e115..84c7cb8e7 100644 --- a/.github/workflows/tests_unit.yml +++ b/.github/workflows/tests_unit.yml @@ -53,4 +53,15 @@ jobs: - name: tests run: | source $(poetry env info -p)/bin/activate - pytest --ignore=tests/integration tests/ + coverage run --source=milabench -m pytest --ignore=tests/integration tests/ + coverage report -m + coverage xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 + with: + file: ./coverage.xml + flags: unittests + env_vars: PLATFORM,PYTHON + name: codecov-umbrella + fail_ci_if_error: false \ No newline at end of file diff --git a/poetry.lock b/poetry.lock index 66f14cc37..05ec27a3f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. [[package]] name = "alabaster" @@ -2189,4 +2189,4 @@ test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", [metadata] lock-version = "2.0" python-versions = ">=3.10,<4.0" -content-hash = "e7242eff960d340d5675e36f416a14f90638f4b1671eee58bcd6c35af29fdb84" +content-hash = "ac862de7cec59d54e21cdc3280c72810aa15b88da6e9b6e67fb03d7e89228177" diff --git a/pyproject.toml b/pyproject.toml index fa2bf0aab..6695d6440 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -49,6 +49,7 @@ pytest-cov = "^3.0.0" Sphinx = "^4.5.0" sphinx-rtd-theme = "^1.0.0" pytest-regressions = "^2.4.2" +coverage = "^7.5.4" [build-system] requires = ["poetry-core>=1.0.0"]