Skip to content

Commit

Permalink
ci: Fixes coverage upload
Browse files Browse the repository at this point in the history
  • Loading branch information
frgfm committed Jan 24, 2024
1 parent df884a4 commit ce1f87a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
7 changes: 5 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
]
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ce1f87a

Please sign in to comment.