Skip to content

Commit

Permalink
Fix coverage (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Oct 20, 2023
1 parent 40acf61 commit c8ca42b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
cache: pip
- run: |
pip install -U pip
pip install .[test]
pip install -e .[test]
- run: |
coverage run -m pytest
coverage xml
coverage-rich report
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ classifiers = [
]
dependencies = []
[project.optional-dependencies]
test = ["pytest", "coverage"]
test = [
"pytest",
"coverage",
"coverage-rich",
"toml", # coverage-rich’s dep anyconfig needs this to load the config
]

[tool.black]
line-length = 100
Expand Down Expand Up @@ -66,7 +71,7 @@ packages = ["src/legacy_api_wrap", "src/testing/legacy_api_wrap"]
features = ["test"]
[tool.hatch.envs.test.scripts]
run = "pytest {args}"
cov = "coverage run -m pytest {args} && coverage report && coverage html"
cov = "coverage run -m pytest {args} && coverage-rich report && coverage html"
[[tool.hatch.envs.test.matrix]]
python = ["3.8", "3.9", "3.10", "3.11"]

Expand Down

0 comments on commit c8ca42b

Please sign in to comment.