From fae48b4da72122ec39a8b9de8251d443caf4bcb7 Mon Sep 17 00:00:00 2001 From: Marshall Ward Date: Fri, 6 Oct 2023 14:14:18 -0400 Subject: [PATCH] .testing: Codecov token for unit test upload The codecov token was added to the tc* test upload, but not the unit test upload. This patch adds the token to the unit testing. --- .github/workflows/coverage.yml | 4 ++++ .testing/Makefile | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index a54fda32a6..ad15989475 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,10 +28,14 @@ jobs: - name: Report unit test coverage to CI (PR) if: github.event_name == 'pull_request' run: make report.cov.unit REQUIRE_COVERAGE_UPLOAD=true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Report unit test coverage to CI (Push) if: github.event_name != 'pull_request' run: make report.cov.unit + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Compile ocean-only MOM6 with code coverage run: make -j build/cov/MOM6 diff --git a/.testing/Makefile b/.testing/Makefile index c2ab27741a..b11532f93c 100644 --- a/.testing/Makefile +++ b/.testing/Makefile @@ -698,7 +698,7 @@ build/unit/MOM_file_parser_tests.F90.gcov: $(WORKSPACE)/work/unit/std.out .PHONY: report.cov.unit report.cov.unit: build/unit/MOM_file_parser_tests.F90.gcov codecov - ./codecov -R build/unit -f "*.gcov" -Z -n "Unit tests" \ + ./codecov $(CODECOV_TOKEN_ARG) -R build/unit -f "*.gcov" -Z -n "Unit tests" \ > build/unit/codecov.out \ 2> build/unit/codecov.err \ && echo -e "${MAGENTA}Report uploaded to codecov.${RESET}" \