Browse Source

feat(ci): Use codecov "carryforward" feature (#33087)

This tells codecov to use a previous commits coverage values when calculating the coverage for current commit. This is necessary because we do not run the full test suite for every commit.

This should solve the problem where our coverage jumps back and forth because of the partial test runs.

See https://docs.codecov.com/docs/carryforward-flags
Billy Vong 2 years ago
parent
commit
71d2d9d38c
1 changed files with 19 additions and 7 deletions
  1. 19 7
      codecov.yml

+ 19 - 7
codecov.yml

@@ -1,17 +1,18 @@
+# Setting coverage targets per flag
 coverage:
   status:
     project:
       default: false
     patch:
       default: false
-      python:
-        paths:
-        - "src/sentry/**/*.py"
-        target: 90%
-      javascript:
-        paths:
-        - "static/app"
+      frontend:
         target: 60%
+        flags:
+        - frontend
+      backend:
+        target: 90%
+        flags:
+          - backend
   ignore:
   - src/.*?/migrations/.*
   - src/bitfield/.*
@@ -21,4 +22,15 @@ coverage:
   - src/social_auth/.*
   - static/app/routes.tsx
   - tests/
+
+flags:
+  frontend:
+    paths:
+    - "static/app"
+    carryforward: true
+  backend:
+    paths:
+    - "src/sentry/**/*.py"
+    carryforward: true
+
 comment: false