Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Set up Python-focused testing infra #742

Merged
merged 18 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---

codecov:
notify:
after_n_builds: 21 # Number of test matrix+lint jobs uploading coverage
wait_for_ci: false

require_ci_to_pass: false

token: >- # notsecret # repo-scoped, upload-only, stability in fork PRs
7316089b-55fe-4646-b640-78d84b79d109

comment:
require_changes: true

coverage:
range: 100..100
status:
patch:
default:
target: 100%
pytest:
target: 100%
flags:
- pytest
typing:
flags:
- MyPy
project:
default:
target: 95%
lib:
flags:
- pytest
paths:
- src/
target: 100%
tests:
flags:
- pytest
paths:
- tests/
target: 100%
typing:
flags:
- MyPy
target: 90%

github_checks:
# Annotations are deprecated in Codecov because they are misleading.
# Ref: https://github.com/codecov/codecov-action/issues/1710
annotations: false

...
34 changes: 34 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[html]
show_contexts = true
skip_covered = false

[paths]
_site-packages-to-src-mapping =
src
*/src
*\src
*/lib/pypy*/site-packages
*/lib/python*/site-packages
*\Lib\site-packages

[report]
skip_covered = true
skip_empty = true
show_missing = true
exclude_also =
^\s*@pytest\.mark\.xfail
^\s*\.\.\.\s*(#.*)?$

[run]
branch = true
cover_pylib = false
# https://coverage.rtfd.io/en/latest/contexts.html#dynamic-contexts
# dynamic_context = test_function # conflicts with `pytest-cov` if set here
parallel = true
plugins =
covdefaults
relative_files = true
source =
.
source_pkgs =
pre_commit_terraform
Loading
Loading