Skip to content

Commit

Permalink
update codecov script and documentation (#314)
Browse files Browse the repository at this point in the history
  • Loading branch information
apcraig authored Apr 24, 2020
1 parent b25d616 commit fcc2657
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
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

0 comments on commit fcc2657

Please sign in to comment.