-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
/
codecov.yml
122 lines (117 loc) · 4.03 KB
/
codecov.yml
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Setting coverage targets per flag
coverage:
status:
project: false
patch:
frontend:
# codecov will not fail status checks for master
only_pulls: true
informational: false # Fail the check
target: 60%
flags:
- frontend
backend:
# codecov will not fail status checks for master
only_pulls: true
informational: false # Fail the check
target: 90%
flags:
- backend
ignore:
- src/*/migrations/
- src/bitfield/
- src/sentry/debug/
- src/sentry/runner/
- src/social_auth/
- static/app/routes.tsx
- static/app/**/*.stories.tsx
- static/app/**/__stories__/
- tests/
component_management:
individual_components:
# Profiling team components
- component_id: 'profiling_views'
name: 'Profiling Views'
paths:
- 'static/app/views/profiling/**'
- component_id: 'profiling_components'
name: 'Profiling Components'
paths:
- 'src/sentry/static/sentry/app/components/profiling/**'
- component_id: 'profiling_utils'
name: 'Profiling Utils'
paths:
- 'src/sentry/static/sentry/app/utils/profiling/**'
flags:
frontend:
paths:
- 'static/app/'
carryforward: true
# FE uploads 4 coverage reports. This property ensures codecov waits
# for all reports to be uploaded before creating a GitHub status check.
# NOTE: If you change this, make sure to change `comment.after_n_builds` below as well.
after_n_builds: 4
backend:
paths:
- 'src/sentry/**/*.py'
carryforward: true
# Do not send any status checks until n coverage reports are uploaded.
# NOTE: If you change this, make sure to change `comment.after_n_builds` below as well.
after_n_builds: 18
# https://docs.codecov.com/docs/flags#two-approaches-to-flag-management
flag_management:
individual_flags:
- name: smart-tests
# Prevents the upload with this flag from being copied accross commits
carryforward: false
# https://docs.codecov.com/docs/getting-started-with-ats#step-2-configure-the-codecovyml-for-automated-test-selection
# carryforward_mode: "labels"
statuses:
# https://github.com/codecov/shared/blob/main/shared/validation/user_schema.py#L310
- type: 'patch'
only_pulls: true
# Read more here: https://docs.codecov.com/docs/pull-request-comments
comment:
#### FOR TESTING ####
# If you want to test in your PR commenting configurations changes,
# comment out this line and uncomment the next line in the next section
# require_bundle_changes: false
######################
# Post comment if there are changes in bundle size increases greater than value specified
require_bundle_changes: 'bundle_increase'
######################
# This is the addition of carry forward builds and fresh builds, thus, it's the addition
# of the FE and BE builds
after_n_builds: 22
# What to render in the comment
layout: 'diff, condensed_files'
# Do not show the project coverage in the comment
hide_project_coverage: true
# Update, if exists. Otherwise post new. Skip if deleted.
behavior: once
# Only post if coverage drops OR there are uncovered lines of code
require_changes: 'coverage_drop OR uncovered_patch'
require_base: true # must have a base report to post
require_head: true # must have a head report to post
bundle_change_threshold: '10Kb'
cli:
# This would be used when uploading the ats results
# But we will not be doing that yet
plugins:
pycoverage:
report_type: 'json'
compress-pycoverage:
file_to_compress: '.artifacts/python.coverage.json'
# We don't want to upload the original coverage report by accident
# Because it's too big
delete_uncompressed: true
runners:
pytest:
# Same args used for the backend tests
# See Makefile:135
collect_tests_options:
- 'tests'
- '--ignore=tests/acceptance'
- '--ignore=tests/apidocs'
- '--ignore=tests/js'
- '--ignore=tests/tools'