Skip to content
Open
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
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,12 @@ jobs:
# --junit-xml emits a JUnit-XML report alongside the coverage XML
# so the Test Analytics upload below can feed Codecov's failing-
# test PR comments and flaky-test detection on main.
#
# Branch coverage is ON, but via `[tool.coverage.run] branch = true`
# in amber/pyproject.toml rather than a `--cov-branch` flag here, so
# that a local `pytest --cov` reports the same metric as CI. Don't
# add the flag back: it would be redundant, and two switches for one
# boolean invites someone to remove one and think it is off.
env:
# Pytest runs with -s, so loguru's default stderr sink prints
# straight into the CI log; pin it to WARNING (loguru has no WARN)
Expand Down
11 changes: 10 additions & 1 deletion amber/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,13 @@ testpaths = ["src/test/python"]
addopts = "--import-mode=importlib"
markers = [
"integration: end-to-end test routed to the amber-integration CI job",
]
]

# Branch coverage. Without this, coverage.py records only whether each
# statement ran, so a half-taken `if` reads as fully covered and Codecov
# has no partial-line data for any pyamber file. Setting it here rather
# than passing `--cov-branch` in CI keeps a local `pytest --cov` run on
# the same metric as the pipeline — a local-vs-CI split is exactly how a
# line comes to look green on a laptop and partial on Codecov.
[tool.coverage.run]
branch = true
Loading