codecov.yml 3.9 KB

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