Browse Source

fix(codecov): Only upload FE coverage when FE changes happen (#43380)

We currently upload frontend test coverage on every backend change, thus, we overwrite carry forward coverage for the frontend, thus, impacting scores. This change fixes.
Armen Zambrano G 2 years ago
parent
commit
718d679339
1 changed files with 7 additions and 0 deletions
  1. 7 0
      .github/workflows/acceptance.yml

+ 7 - 0
.github/workflows/acceptance.yml

@@ -108,8 +108,11 @@ jobs:
           save-only: true
           snapshot-path: .artifacts/visual-snapshots
 
+      # This job runs when FE or BE changes happen, however, we only upload coverage data for
+      # FE changes since it conflicts with codecov's carry forward functionality
       - name: Handle artifacts
         uses: ./.github/actions/artifacts
+        if: needs.files-changed.outputs.frontend_all == 'true'
         with:
           files: .artifacts/coverage/*
           type: frontend
@@ -185,6 +188,8 @@ jobs:
           save-only: true
           snapshot-path: .artifacts/visual-snapshots
 
+      # This job runs when FE or BE changes happen, however, we only upload coverage data for
+      # BE changes since it conflicts with codecov's carry forward functionality
       - name: Handle artifacts
         uses: ./.github/actions/artifacts
         if: needs.files-changed.outputs.backend_all == 'true'
@@ -248,6 +253,8 @@ jobs:
           save-only: true
           snapshot-path: .artifacts/visual-snapshots
 
+      # This job runs when FE or BE changes happen, however, we only upload coverage data for
+      # BE changes since it conflicts with codecov's carry forward functionality
       - name: Handle artifacts
         uses: ./.github/actions/artifacts
         if: needs.files-changed.outputs.backend_all == 'true'