codecov.yml 3.7 KB

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