codecov.yml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. # Setting coverage targets per flag
  2. coverage:
  3. status:
  4. project: false
  5. patch:
  6. frontend:
  7. # codecov will not fail status checks for master
  8. only_pulls: true
  9. informational: false # Fail the check
  10. target: 60%
  11. flags:
  12. - frontend
  13. backend:
  14. # codecov will not fail status checks for master
  15. only_pulls: true
  16. informational: false # Fail the check
  17. target: 90%
  18. flags:
  19. - backend
  20. ignore:
  21. - src/*/migrations/
  22. - src/bitfield/
  23. - src/sentry/debug/
  24. - src/sentry/runner/
  25. - src/social_auth/
  26. - static/app/routes.tsx
  27. - static/app/**/*.stories.tsx
  28. - static/app/**/__stories__/
  29. - tests/
  30. component_management:
  31. individual_components:
  32. # Profiling team components
  33. - component_id: 'profiling_views'
  34. name: 'Profiling Views'
  35. paths:
  36. - 'static/app/views/profiling/**'
  37. - component_id: 'profiling_components'
  38. name: 'Profiling Components'
  39. paths:
  40. - 'src/sentry/static/sentry/app/components/profiling/**'
  41. - component_id: 'profiling_utils'
  42. name: 'Profiling Utils'
  43. paths:
  44. - 'src/sentry/static/sentry/app/utils/profiling/**'
  45. flags:
  46. frontend:
  47. paths:
  48. - 'static/app/'
  49. carryforward: true
  50. # FE uploads 4 coverage reports. This property ensures codecov waits
  51. # for all reports to be uploaded before creating a GitHub status check.
  52. # NOTE: If you change this, make sure to change `comment.after_n_builds` below as well.
  53. after_n_builds: 4
  54. backend:
  55. paths:
  56. - 'src/sentry/**/*.py'
  57. carryforward: true
  58. # Do not send any status checks until n coverage reports are uploaded.
  59. # NOTE: If you change this, make sure to change `comment.after_n_builds` below as well.
  60. after_n_builds: 18
  61. # https://docs.codecov.com/docs/flags#two-approaches-to-flag-management
  62. flag_management:
  63. individual_flags:
  64. - name: smart-tests
  65. # Prevents the upload with this flag from being copied accross commits
  66. carryforward: false
  67. # https://docs.codecov.com/docs/getting-started-with-ats#step-2-configure-the-codecovyml-for-automated-test-selection
  68. # carryforward_mode: "labels"
  69. statuses:
  70. # https://github.com/codecov/shared/blob/main/shared/validation/user_schema.py#L310
  71. - type: 'patch'
  72. only_pulls: true
  73. # Read more here: https://docs.codecov.com/docs/pull-request-comments
  74. comment:
  75. #### FOR TESTING ####
  76. # If you want to test in your PR commenting configurations changes,
  77. # comment out this line and uncomment the next line in the next section
  78. # require_bundle_changes: false
  79. ######################
  80. # Post comment if there are changes in bundle size increases greater than value specified
  81. require_bundle_changes: 'bundle_increase'
  82. ######################
  83. # This is the addition of carry forward builds and fresh builds, thus, it's the addition
  84. # of the FE and BE builds
  85. after_n_builds: 22
  86. # What to render in the comment
  87. layout: 'diff, condensed_files'
  88. # Do not show the project coverage in the comment
  89. hide_project_coverage: true
  90. # Update, if exists. Otherwise post new. Skip if deleted.
  91. behavior: once
  92. # Only post if coverage drops OR there are uncovered lines of code
  93. require_changes: 'coverage_drop OR uncovered_patch'
  94. require_base: true # must have a base report to post
  95. require_head: true # must have a head report to post
  96. bundle_change_threshold: '10Kb'
  97. cli:
  98. # This would be used when uploading the ats results
  99. # But we will not be doing that yet
  100. plugins:
  101. pycoverage:
  102. report_type: 'json'
  103. compress-pycoverage:
  104. file_to_compress: '.artifacts/python.coverage.json'
  105. # We don't want to upload the original coverage report by accident
  106. # Because it's too big
  107. delete_uncompressed: true
  108. runners:
  109. pytest:
  110. # Same args used for the backend tests
  111. # See Makefile:135
  112. collect_tests_options:
  113. - 'tests'
  114. - '--ignore=tests/acceptance'
  115. - '--ignore=tests/apidocs'
  116. - '--ignore=tests/js'
  117. - '--ignore=tests/tools'