Skip to content

Commit 9ff186c

Browse files
committed
chore(tests): set omit targets on coverage config file
1 parent 9eaacbf commit 9ff186c

File tree

2 files changed

+33
-24
lines changed

2 files changed

+33
-24
lines changed

.coveragerc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
[run]
22
concurrency = thread,gevent
3+
omit =
4+
*/__init__.py
5+
main.py
6+
*/data/*
7+
*/models/*
8+
*/schemas/*
9+
*/tests/*
10+
11+
[report]
12+
exclude_lines =
13+
pragma: no cover # Standard pragma to intentionally skip lines
14+
if __name__ == .__main__.: # Skips CLI bootstrapping code
15+
raise NotImplementedError # Often placeholder stubs not meant to be covered

codecov.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,29 @@
1+
# Codecov Repository YAML
12
# https://docs.codecov.com/docs/codecov-yaml
23

34
coverage:
5+
# https://docs.codecov.com/docs/commit-status
46
status:
57
project:
68
default:
79
target: 80%
810
threshold: 10%
911
if_not_found: success
10-
if_ci_failed: error
11-
12+
if_ci_failed: success
1213
patch:
1314
default:
1415
target: 80%
1516
threshold: 10%
17+
if_not_found: success
1618

17-
flags:
18-
unit:
19-
paths:
20-
- "services/"
21-
- "routes/"
22-
carryforward: true
23-
19+
# https://docs.codecov.com/docs/components#component-options
2420
component_management:
2521
default_rules:
2622
statuses:
2723
- type: project
2824
target: auto
2925
branches:
3026
- "!main"
31-
3227
individual_components:
3328
- component_id: services
3429
name: Services
@@ -42,18 +37,19 @@ component_management:
4237
comment:
4338
layout: "header, diff, flags, components"
4439

40+
# https://docs.codecov.com/docs/ignoring-paths
4541
ignore:
46-
- "assets/**/*"
47-
- "data/**/*"
48-
- "models/**/*"
49-
- "postman_collections/**/*"
50-
- "schemas/**/*"
51-
- "tests/**/*"
52-
- "**/*.yml"
53-
- "**/*.json"
54-
- "**/*.txt"
55-
- "**/__pycache__/"
56-
- "**/*.pyc"
57-
- "LICENSE"
58-
- "main.py"
59-
- "README.md"
42+
- "^assets/.*"
43+
- "^data/.*"
44+
- "^models/.*"
45+
- "^postman_collections/.*"
46+
- "^schemas/.*"
47+
- "^tests/.*"
48+
- ".*\\.yml$"
49+
- ".*\\.json$"
50+
- ".*\\.txt$"
51+
- "^__pycache__(/.*)?$"
52+
- ".*\\.pyc$"
53+
- "^LICENSE$"
54+
- "^main\\.py$"
55+
- "^README\\.md$"

0 commit comments

Comments
 (0)