Skip to content

Commit

Permalink
Do codecov upload with tests and delay notifcation
Browse files Browse the repository at this point in the history
  • Loading branch information
pvandyken committed Jul 13, 2024
1 parent 08ca104 commit 2ad9526
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,10 @@ jobs:
--doctest-modules --ignore=docs
--ignore=snakebids/project_template --benchmark-disable
- name: save coverage report
uses: actions/upload-artifact@v4
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
name: coverage-${{ matrix.python-version }}-${{ matrix.split }}
path: ./coverage.xml
verbose: true
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
24 changes: 7 additions & 17 deletions .github/workflows/upload_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,12 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha }}
- name: download coverage reports
uses: actions/download-artifact@v4
with:
run-id: ${{ github.event.workflow_run.id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
pattern: coverage-*
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
fail_ci_if_error: true
override_commit: ${{ github.event.workflow_run.head_sha }}
override_pr: ${{ github.event.workflow_run.pull_requests.number }}
- name: Setup python
uses: actions/setup-python@v5
- name: Install codecov
run: pip install codecov-cli
- name: Send codecov notifications
run: codecovcli send-notifications -C "$SHA" -t "$CODECOV_TOKEN"
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
SHA: ${{ github.event.workflow_run.head_sha }}

0 comments on commit 2ad9526

Please sign in to comment.