codecov.yml 3.5 KB

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