Skip to content

Commit

Permalink
- Make codecov uploads happen even if some jobs have failed.
Browse files Browse the repository at this point in the history
- Fix error in generating list of reports to upload.
- Clean up the implementation a bit.
  • Loading branch information
Dead2 committed May 23, 2024
1 parent af7c6ca commit fb9a17a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,7 @@ jobs:
name: Upload Coverage Reports
runs-on: ubuntu-latest
needs: cmake
if: cancelled() == false
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -758,16 +759,15 @@ jobs:
- name: Display all coverage artifacts
run: |
ls -R *.xml
echo "CODECOV_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g`" >> $GITHUB_ENV
echo "CODECOV_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g'`" >> $GITHUB_ENV
- name: Upload reports
uses: codecov/codecov-action@v4
if: (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
with:
token: ${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}
files: ${{ env.CODECOV_REPORTS }}
name: cmake-umbrella
verbose: true
fail_ci_if_error: true
env:
CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}"
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
6 changes: 3 additions & 3 deletions .github/workflows/pigz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ jobs:
name: Upload Coverage Reports
runs-on: ubuntu-latest
needs: pigz
if: cancelled() == false
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -150,16 +151,15 @@ jobs:
- name: Display all coverage artifacts
run: |
ls -R *.xml
echo "CODECOV_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g`" >> $GITHUB_ENV
echo "CODECOV_REPORTS=`ls -p *.xml | grep -v / | tr '\n' ',' | sed 's/,$//g'`" >> $GITHUB_ENV
- name: Upload reports
uses: codecov/codecov-action@v4
if: (env.CODECOV_TOKEN != '' || github.repository == 'zlib-ng/zlib-ng')
with:
token: ${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}
files: ${{ env.CODECOV_REPORTS }}
name: pigz-umbrella
verbose: true
fail_ci_if_error: true
env:
CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}"
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"

0 comments on commit fb9a17a

Please sign in to comment.