Commit 2ddcf4d
authored
fix(tests): add --cov-append to gapic-generator and proto-plus to preserve monorepo coverage (#17603)
The cover presubmit job failed in
https://github.com/googleapis/google-cloud-python/actions/runs/28464524723/job/84362399849?pr=17600
with `No data to report` for `db-dtypes`.
While most packages correctly use the `--cov-append` flag, both
`gapic-generator` and `proto-plus` were missing it in their respective
`noxfile.py` configurations. When their test suites executed,
`pytest-cov` fell back to its default behavior and truncated the shared
coverage file. This silently wiped out the coverage data of any packages
that ran before them (such as `db-dtypes`), causing the downstream
coverage aggregation job to fail.
Changes
- Added the `--cov-append` flag to the pytest commands in
`packages/gapic-generator/noxfile.py`.
- Added the `--cov-append` flag to the pytest commands in
`packages/proto-plus/noxfile.py`.
- Use `"--cov-fail-under=0",` when running `pytest` in
`gapic-generator`. Each package should specify `fail_under` in
`.coveragerc`
This ensures these packages safely add their coverage data to the shared
file without destroying the results of any packages that were tested
before them.1 parent 1f93a2b commit 2ddcf4d
2 files changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | | - | |
| 88 | + | |
88 | 89 | | |
89 | 90 | | |
90 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
0 commit comments