Skip to content

Commit

Permalink
chore: fix for codecov workflows nih-sparc#42
Browse files Browse the repository at this point in the history
  • Loading branch information
athril committed Jul 25, 2024
1 parent a1325f8 commit aaba839
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 6 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ on:
branches:
- main # Or if it is push to main
pull_request: # Or if it is any pull_request
secrets:
codecov_token:
required: true
workflow_call: # Or if the call comes from another workflow (reusability)
secrets:
codecov_token:
required: true
workflow_dispatch:

permissions:
contents: read
Expand Down Expand Up @@ -48,16 +55,15 @@ jobs:
pytest --cov=./src tests/ --cov-report term --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4.0.1
with:
verbose: true
directory: ./coverage/reports/
env_vars: OS,PYTHON
fail_ci_if_error: true
fail_ci_if_error: false
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
token: ${{ secrets.CODECOV_TOKEN }}
token: ${{ secrets.codecov_token }}

- name: Check if the package builds
run: |
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
check:
needs: verify
uses: ./.github/workflows/CI.yml
secrets:
codecov_token: ${{secrets.CODECOV_TOKEN}}

publish:
needs: check
Expand All @@ -41,7 +43,7 @@ jobs:
packages: write
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'

Expand Down Expand Up @@ -86,7 +88,7 @@ jobs:
uses: pypa/gh-action-pypi-publish@release/v1

- name: Create Release
uses: ncipollo/release-action@v1.13.0
uses: ncipollo/release-action@v1.14.0
with:
allowUpdates: true
draft: false
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
jobs:
check:
uses: ./.github/workflows/CI.yml
secrets:
codecov_token: ${{secrets.CODECOV_TOKEN}}

build:
needs: check
Expand Down

0 comments on commit aaba839

Please sign in to comment.