codecov.yml 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. - 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. cli:
  87. # This would be used when uploading the ats results
  88. # But we will not be doing that yet
  89. plugins:
  90. pycoverage:
  91. report_type: 'json'
  92. compress-pycoverage:
  93. file_to_compress: '.artifacts/python.coverage.json'
  94. # We don't want to upload the original coverage report by accident
  95. # Because it's too big
  96. delete_uncompressed: true
  97. runners:
  98. pytest:
  99. # Same args used for the backend tests
  100. # See Makefile:135
  101. collect_tests_options:
  102. - 'tests'
  103. - '--ignore=tests/acceptance'
  104. - '--ignore=tests/apidocs'
  105. - '--ignore=tests/js'
  106. - '--ignore=tests/tools'