Skip to content

Commit

Permalink
.testing: Codecov token for unit test upload
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
marshallward committed Oct 6, 2023
1 parent e2deaec commit fae48b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}" \
Expand Down

0 comments on commit fae48b4

Please sign in to comment.