Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#163] Run upload to Codecov step only if the token was provided. #164

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/test-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,13 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ env.CODECOV_TOKEN != '' }}
with:
files: ./cobertura.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# yamllint disable-line #;< PHP_PHAR
build-php:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-scaffold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ jobs:

- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ env.CODECOV_TOKEN != '' }}
with:
directory: ./.scaffold-coverage-html
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
6 changes: 4 additions & 2 deletions .github/workflows/test-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,15 @@ jobs:
path: ./.coverage-html
if-no-files-found: error

- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest'
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
if: ${{ env.CODECOV_TOKEN != '' && matrix.os == 'ubuntu-latest' }}
with:
directory: ./.coverage-html
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run Tests on other OSes
if: matrix.os != 'ubuntu-latest'
Expand Down