Skip to content

Commit

Permalink
use CODECOV_TOKEN to upload codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
kamalsaleh committed Jul 8, 2024
1 parent 17dd7a0 commit 8d30194
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ jobs:
fi
- name: Upload code coverage
if: github.event_name != 'schedule' && matrix.image == 'ghcr.io/kamalsaleh/gap-sympy-docker:latest'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
cd MachineLearningForCAP
./dev/upload_codecov.sh
6 changes: 3 additions & 3 deletions dev/upload_codecov.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ shasum -a 256 -c codecov.SHA256SUM

# execute
chmod +x codecov
while ! ./codecov -Z -v -s ../; do
echo "Codecov upload failed, retrying in 60s"
sleep 60
while ! ./codecov -Z -v -s ../ -t $CODECOV_TOKEN; do
echo "Codecov upload failed, retrying in 20s"
sleep 20
done

3 comments on commit 8d30194

@kamalsaleh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zickgraf this is worth trying, it solved the issue of uploading codecov.

@zickgraf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you check if this works for PRs? As far as I know, access to secrets is not available for PRs, so this method does not help for CAP_project etc.

@kamalsaleh
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, it works on push events but not on pull-requests.

Please sign in to comment.