Repository navigation
Expand file tree
/
Copy pathcodecov.yml
More file actions
64 lines (62 loc) · 2.8 KB
/
Copy pathcodecov.yml
File metadata and controls
64 lines (62 loc) · 2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Codecov settings (rule api.quality.coverage-measured;
# tests/unit/test_codecov_coverage.py checks them with the uploads).
#
# Two flags tell the uploads apart:
# unit make test: pr.yml's upload-test-coverage, and push.yml's
# upload-release-test-coverage on each release commit.
# integration the cross-database integration tests in
# v2-integration-check.yml, uploaded by pr.yml's and push.yml's
# upload-integration-coverage wherever those tests run.
# Both measure policyengine_api (.coveragerc's source), so both have its path.
#
# A commit that uploads one flag carries the other forward from its Codecov
# parent: a git parent that has a Codecov report (when both of a merge
# commit's parents have one, which Codecov takes isn't fixed). On master:
# - the merge run uploads integration for the merge commit, which until the
# release run carries unit forward from the pull request head or from the
# master commit before it;
# - the release run uploads the release tests' unit coverage for the release
# commit, which carries integration forward from the merge commit, and for
# the merge commit too, since the release commit changes only the version,
# uv.lock and the changelog.
# A pull request is compared with the master commit it branched from or last
# merged in. A release commit, and a merge commit followed by its own release
# commit, measured both flags on their own code. A merge commit whose release
# never came (versioning's push fails when master moves during the merge run,
# and the next release covers both merges) keeps unit carried forward from an
# earlier commit.
coverage:
status:
project:
default:
target: auto
# Room for rounding and for lines whose coverage moves between runs.
threshold: 0.5%
patch:
default:
# pr.yml's diff-coverage job enforces this minimum for the changed
# lines (api.quality.diff-coverage); Codecov only shows a figure. It
# can differ from the job's: Codecov compares with the master commit
# the branch left from or last merged in, not the merge commit's
# first parent, counts a line with a branch that never ran as not
# covered, and includes flags carried forward from earlier commits.
target: 80%
informational: true
flag_management:
default_rules:
carryforward: true
individual_flags:
- name: unit
paths:
- policyengine_api/
carryforward: true
- name: integration
paths:
- policyengine_api/
carryforward: true
# .coveragerc measures only policyengine_api, so these are never reported
# today; the entries keep test code and generated Alembic revisions out if the
# measured source ever widens.
ignore:
- "tests/**"
- "migrations/*/versions/**"