Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update codecov script and documentation #314

Merged
merged 1 commit into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion doc/source/user_guide/ug_testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,10 @@ To use, submit a full test suite using a version of Icepack on the Consortium ma
and the gnu compiler with the ``--codecov`` argument.
The test suite will run and then a report will be generated and uploaded to
the `codecov.io site <https://codecov.io/gh/CICE-Consortium/Icepack>`_ by the
**report_codecov.csh** script.
**report_codecov.csh** script. The env variable CODECOV_TOKEN needs to be defined
either in the environment or in a file named **~/.codecov_icepack_token**. That
token provides write permission to the Icepack codecov.io site and is available
by contacting the Consortium team directly.

This is a special diagnostic test and does not constitute proper model testing.
General use is not recommended, this is mainly used as a diagnostic to periodically
Expand Down
14 changes: 11 additions & 3 deletions icepack.setup
Original file line number Diff line number Diff line change
Expand Up @@ -458,10 +458,18 @@ EOF0
cat >! ${tsdir}/report_codecov.csh << EOF0
#!/bin/csh -f

setenv CODECOV_TOKEN "df12b574-8dce-439d-8d3b-ed7428d7598a" # consortium icepack
#setenv CODECOV_TOKEN "0b3feb13-0110-4618-821e-248c2f1f7cf3" # apcraig icepack
set report_name = "${shhash}:${branch}:${machine} ${testsuite}"
# define CODECOV_TOKEN env variable
if !(\$?CODECOV_TOKEN) then
if (-e ~/.codecov_icepack_token) then
source ~/.codecov_icepack_token
endif
if !(\$?CODECOV_TOKEN) then
echo "\${0}: ERROR, CODECOV_TOKEN env variable not defined"
exit 2
endif
endif

set report_name = "${shhash}:${branch}:${machine} ${testsuite}"
set use_curl = 1

EOF0
Expand Down