From 2473c114806ef3b161a3f0d59eaef3f7c2ca2b95 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 29 Apr 2024 13:02:06 -0700 Subject: [PATCH 1/5] Do not upload codecoverage data from boilerplate Signed-off-by: Eduardo Apolinario --- boilerplate/flyte/golang_test_targets/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/boilerplate/flyte/golang_test_targets/Makefile b/boilerplate/flyte/golang_test_targets/Makefile index 3f743e8625..4b0f254329 100644 --- a/boilerplate/flyte/golang_test_targets/Makefile +++ b/boilerplate/flyte/golang_test_targets/Makefile @@ -54,7 +54,6 @@ test_unit_visual: .PHONY: test_unit_codecov test_unit_codecov: go test ./... -race -coverprofile=coverage.txt -covermode=atomic - curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh .PHONY: go-tidy go-tidy: From 88099ff69e9c3db55e2d6067d4339ca6e13debe0 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 29 Apr 2024 13:29:50 -0700 Subject: [PATCH 2/5] Use correct token to upload code coverage data Signed-off-by: Eduardo Apolinario --- .github/workflows/unit-tests.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 475e010496..fa5e7fe1a8 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -27,15 +27,11 @@ jobs: with: go-version: ${{ inputs.go-version }} - name: Unit Tests - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} run: make install && make test_unit_codecov - # TODO(monorepo): Figure out how to do code coverage aggregation - name: Push CodeCov - uses: codecov/codecov-action@v3.1.1 - env: - GITHUB_TOKEN: ${{ secrets.FLYTE_BOT_PAT }} + uses: codecov/codecov-action@v4 with: file: coverage.txt - flags: unittests + flags: unittests-${{ inputs.component }} fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} From e972f72b103827671987fc327b229db7c8bcec03 Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 29 Apr 2024 14:04:01 -0700 Subject: [PATCH 3/5] Pipe in CODECOV_TOKEN as an input secret Signed-off-by: Eduardo Apolinario --- .github/workflows/unit-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index fa5e7fe1a8..aa5466304f 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -10,7 +10,7 @@ on: required: true type: string secrets: - FLYTE_BOT_PAT: + CODECOV_TOKEN: required: true jobs: tests: From b97b77751f074656f025e2e86e4b5a2bf29c88dd Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 29 Apr 2024 14:06:21 -0700 Subject: [PATCH 4/5] Actually pipe the secret in Signed-off-by: Eduardo Apolinario --- .github/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 8532179444..95f5a04893 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -61,7 +61,7 @@ jobs: component: ${{ matrix.component }} go-version: ${{ needs.unpack-envvars.outputs.go-version }} secrets: - FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} docker-build: strategy: fail-fast: false From 306afdfd40de0ec718a76f38f729236bce449d0b Mon Sep 17 00:00:00 2001 From: Eduardo Apolinario Date: Mon, 29 Apr 2024 14:17:03 -0700 Subject: [PATCH 5/5] Pipe codecov token in flyteidl tests too --- .github/workflows/flyteidl-checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/flyteidl-checks.yml b/.github/workflows/flyteidl-checks.yml index 1811126d91..89f1fc5c81 100644 --- a/.github/workflows/flyteidl-checks.yml +++ b/.github/workflows/flyteidl-checks.yml @@ -39,7 +39,7 @@ jobs: component: flyteidl go-version: ${{ needs.unpack-envvars.outputs.go-version }} secrets: - FLYTE_BOT_PAT: ${{ secrets.FLYTE_BOT_PAT }} + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} generate: name: Check Go Generate needs: