codecov.yml 3.9 KB

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