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 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: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 475e010496..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: @@ -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 }} 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: