Skip to content

Commit ce3cdc9

Browse files
committed
Try setting the branch
1 parent ba76eea commit ce3cdc9

2 files changed

Lines changed: 12 additions & 37 deletions

File tree

‎.circleci/config.yml‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,19 @@ jobs:
2828
pixi run --as-is esmvaltool -- --help
2929
pixi run --as-is esmvaltool config list
3030
pixi run --as-is esmvaltool config show
31+
- run:
32+
name: Set the branch name for upload to Codecov
33+
command: |
34+
repo=${CIRCLE_PR_USERNAME}/${CIRCLE_PR_REPONAME}
35+
branch=$(git branch --show-current)
36+
if [ -z "$CODECOV_TOKEN" ] && [ "${repo}" != "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" ]; then
37+
codecov_branch=${repo}:${branch}
38+
else
39+
codecov_branch=${branch}
40+
fi
41+
echo "export CODECOV_BRANCH=${codecov_branch}" >> $BASH_ENV
3142
- codecov/upload:
43+
branch: ${CODECOV_BRANCH}
3244
files: "test-reports/coverage.xml"
3345
disable_search: true
3446
- store_test_results:

‎.github/workflows/run-tests-fork.yml‎

Lines changed: 0 additions & 37 deletions
This file was deleted.

0 commit comments

Comments
 (0)