Skip to content

Commit

Permalink
🔧 Update coverage config files
Browse files Browse the repository at this point in the history
  • Loading branch information
tiangolo committed Aug 18, 2024
1 parent be94cd7 commit c120eb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
- run: ls -la coverage
- run: coverage combine coverage
- run: coverage report
- run: coverage html --show-contexts --title "Coverage for ${{ github.sha }}"
- run: coverage html --title "Coverage for ${{ github.sha }}"

- name: Store coverage HTML
uses: actions/upload-artifact@v4
Expand Down
7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,28 @@ optional-dependencies = {}

[tool.coverage.run]
parallel = true
data_file = "coverage/.coverage"
source = [
"docs_src",
"tests",
"sqlmodel"
]
context = '${CONTEXT}'
dynamic_context = "test_function"

[tool.coverage.report]
show_missing = true
sort = "-Cover"
exclude_lines = [
"pragma: no cover",
"@overload",
'if __name__ == "__main__":',
"if TYPE_CHECKING:",
]

[tool.coverage.html]
show_contexts = true

[tool.mypy]
strict = true

Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -x

coverage run -m pytest tests
coverage combine
coverage report --show-missing
coverage report
coverage html

0 comments on commit c120eb6

Please sign in to comment.