From 6192b0124af8965621f791defc818e0390fb35a5 Mon Sep 17 00:00:00 2001 From: EasonPan Date: Tue, 18 Jun 2024 15:37:38 -0700 Subject: [PATCH] 21696-fix broken code coverage uploads in CIs (#2767) * fix Codecov upload issues - change to v4, add token, add Codecov section for 2 jobs * add multiple flags to codegov.yaml, remove datareset flag --- .github/workflows/colin-api-ci.yml | 3 ++- .github/workflows/entity-bn-ci.yml | 3 ++- .../entity-digital-credentials-ci.yml | 3 ++- .github/workflows/entity-emailer-ci.yml | 3 ++- .github/workflows/entity-filer-ci.yml | 3 ++- .github/workflows/entity-pay-ci.yml | 3 ++- .github/workflows/furnishings-ci.yml | 8 +++++++ .../workflows/involuntary-dissolutions-ci.yml | 10 ++++++++- codecov.yaml | 21 ++++++++++++++++--- 9 files changed, 47 insertions(+), 10 deletions(-) diff --git a/.github/workflows/colin-api-ci.yml b/.github/workflows/colin-api-ci.yml index 0640d9dab9..bb446a468b 100644 --- a/.github/workflows/colin-api-ci.yml +++ b/.github/workflows/colin-api-ci.yml @@ -92,11 +92,12 @@ jobs: run: | make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./colin-api/coverage.xml flags: colinapi name: codecov-colin-api + token: ${{ secrets.CODECOV_TOKEN}} fail_ci_if_error: true build-check: diff --git a/.github/workflows/entity-bn-ci.yml b/.github/workflows/entity-bn-ci.yml index 618c68917a..ec235d4d15 100644 --- a/.github/workflows/entity-bn-ci.yml +++ b/.github/workflows/entity-bn-ci.yml @@ -95,11 +95,12 @@ jobs: run: | make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./queue_services/entity-bn/coverage.xml flags: entitybn name: codecov-entity-bn + token: ${{ secrets.CODECOV_TOKEN}} fail_ci_if_error: true build-check: diff --git a/.github/workflows/entity-digital-credentials-ci.yml b/.github/workflows/entity-digital-credentials-ci.yml index e79ae304de..4455bf3e80 100644 --- a/.github/workflows/entity-digital-credentials-ci.yml +++ b/.github/workflows/entity-digital-credentials-ci.yml @@ -91,11 +91,12 @@ jobs: run: | make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./queue_services/entity-digital-credentials/coverage.xml flags: entity-digital-credentials name: codecov-entity-digital-credentials + token: ${{ secrets.CODECOV_TOKEN}} fail_ci_if_error: true build-check: diff --git a/.github/workflows/entity-emailer-ci.yml b/.github/workflows/entity-emailer-ci.yml index 4299229f0b..946b9c6f91 100644 --- a/.github/workflows/entity-emailer-ci.yml +++ b/.github/workflows/entity-emailer-ci.yml @@ -111,11 +111,12 @@ jobs: run: | make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./queue_services/entity-emailer/coverage.xml flags: entityemailer name: codecov-entity-emailer + token: ${{ secrets.CODECOV_TOKEN}} fail_ci_if_error: true build-check: diff --git a/.github/workflows/entity-filer-ci.yml b/.github/workflows/entity-filer-ci.yml index 164ce124ff..981cc4e4f1 100644 --- a/.github/workflows/entity-filer-ci.yml +++ b/.github/workflows/entity-filer-ci.yml @@ -102,11 +102,12 @@ jobs: run: | make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./queue_services/entity-filer/coverage.xml flags: entityfiler name: codecov-entity-filer + token: ${{ secrets.CODECOV_TOKEN}} fail_ci_if_error: true build-check: diff --git a/.github/workflows/entity-pay-ci.yml b/.github/workflows/entity-pay-ci.yml index a3744ea2dc..f76004664e 100644 --- a/.github/workflows/entity-pay-ci.yml +++ b/.github/workflows/entity-pay-ci.yml @@ -97,11 +97,12 @@ jobs: run: | make test - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: file: ./queue_services/entity-pay/coverage.xml flags: entitypay name: codecov-entity-pay + token: ${{ secrets.CODECOV_TOKEN}} fail_ci_if_error: true build-check: diff --git a/.github/workflows/furnishings-ci.yml b/.github/workflows/furnishings-ci.yml index c778a12d27..9c983e882a 100644 --- a/.github/workflows/furnishings-ci.yml +++ b/.github/workflows/furnishings-ci.yml @@ -82,6 +82,14 @@ jobs: id: test run: | make test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./jobs/furnishings/coverage.xml + flags: furnishings + name: codecov-furnishings + token: ${{ secrets.CODECOV_TOKEN}} + fail_ci_if_error: true build-check: needs: setup-job diff --git a/.github/workflows/involuntary-dissolutions-ci.yml b/.github/workflows/involuntary-dissolutions-ci.yml index d860e49580..dd0cad6e19 100644 --- a/.github/workflows/involuntary-dissolutions-ci.yml +++ b/.github/workflows/involuntary-dissolutions-ci.yml @@ -88,6 +88,14 @@ jobs: id: test run: | make test + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + file: ./jobs/involuntary-dissolutions/coverage.xml + flags: involuntary-dissolutions + name: codecov-involuntary-dissolutions + token: ${{ secrets.CODECOV_TOKEN}} + fail_ci_if_error: true build-check: needs: setup-job @@ -98,4 +106,4 @@ jobs: - name: build to check strictness id: build run: | - make build-nc \ No newline at end of file + make build-nc diff --git a/codecov.yaml b/codecov.yaml index bf5d0019e9..1b80c27959 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -18,7 +18,10 @@ coverage: - entityemailer - entityfiler - entitypay - - datareset + - entitybn + - entity-digital-credentials + - furnishings + - involuntary-dissolutions ignore: - "^/tests/**/*" # ignore test harness code @@ -57,7 +60,19 @@ flags: paths: - queue_services/entity-pay/src/entity_pay carryforward: true - datareset: + entitybn: paths: - - data-reset-tool/src/data_reset_tool + - queue_services/entity-bn/src/entity_bn + carryforward: true + entity-digital-credentials: + paths: + - queue_services/entity-digital-credentials/src/entity_digital_credentials + carryforward: true + furnishings: + paths: + - jobs/furnishings + carryforward: true + involuntary-dissolutions: + paths: + - jobs/involuntary-dissolutions carryforward: true