From: Hans Kristian Rosbach Date: Fri, 17 May 2024 14:04:57 +0000 (+0200) Subject: - Make codecov uploads happen even if some jobs have failed. X-Git-Tag: 2.2.0~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb9a17a8f670083d94e7e6ab89bd4a769d383c16;p=thirdparty%2Fzlib-ng.git - Make codecov uploads happen even if some jobs have failed. - Fix error in generating list of reports to upload. - Clean up the implementation a bit. --- diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index be66d505..79ee1554 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -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 @@ -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 }}" diff --git a/.github/workflows/pigz.yml b/.github/workflows/pigz.yml index d7699d4e..ac2deffb 100644 --- a/.github/workflows/pigz.yml +++ b/.github/workflows/pigz.yml @@ -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 @@ -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 }}"