codecov.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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. - 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. # This is the addition of carry forward builds and fresh builds, thus, it's the addition
  75. # of the FE and BE builds
  76. after_n_builds: 22
  77. layout: 'diff, files'
  78. # Update, if comment exists. Otherwise post new.
  79. behavior: default
  80. # Comments will only post when coverage changes. Furthermore, if a comment
  81. # already exists, and a newer commit results in no coverage change for the
  82. # entire pull, the comment will be deleted.
  83. require_changes: true
  84. require_base: true # must have a base report to post
  85. require_head: true # must have a head report to post
  86. require_bundle_changes: True # only post a comment when there are bundle size changes
  87. cli:
  88. # This would be used when uploading the ats results
  89. # But we will not be doing that yet
  90. plugins:
  91. pycoverage:
  92. report_type: 'json'
  93. compress-pycoverage:
  94. file_to_compress: '.artifacts/python.coverage.json'
  95. # We don't want to upload the original coverage report by accident
  96. # Because it's too big
  97. delete_uncompressed: true
  98. runners:
  99. pytest:
  100. # Same args used for the backend tests
  101. # See Makefile:135
  102. collect_tests_options:
  103. - 'tests'
  104. - '--ignore=tests/acceptance'
  105. - '--ignore=tests/apidocs'
  106. - '--ignore=tests/js'
  107. - '--ignore=tests/tools'