diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d8c8292..82cf642 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -30,7 +30,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -e ".[test]" --upgrade + pip install -e ".[test]" - name: Run unittests run: pytest --cov=torchcam --cov-report xml tests/ - uses: actions/upload-artifact@v2 @@ -46,6 +46,7 @@ jobs: - uses: codecov/codecov-action@v3 with: token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage.xml flags: unittests fail_ci_if_error: true diff --git a/pyproject.toml b/pyproject.toml index dc20230..003f18a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,7 +44,7 @@ dependencies = [ test = [ "requests>=2.20.0,<3.0.0", "torchvision>=0.15.0,<1.0.0", - "pytest>=7.3.2", + "pytest==7.4.2", "pytest-cov>=3.0.0,<5.0.0", "pytest-pretty>=1.0.0,<2.0.0", ] @@ -72,7 +72,7 @@ dev = [ # test "requests>=2.20.0,<3.0.0", "torchvision>=0.15.0,<1.0.0", - "pytest>=7.3.2", + "pytest==7.4.2", "pytest-cov>=4.0.0,<5.0.0", "pytest-pretty>=1.0.0,<2.0.0", # style @@ -104,6 +104,9 @@ exclude = ["demo*", "docs*", "notebooks*", "scripts*", "tests*"] [tool.pytest.ini_options] testpaths = ["torchcam/"] +[tool.coverage.run] +source = ["torchcam/"] + [tool.ruff] select = [ "E", # pycodestyle errors