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.1.7~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1fa60f273d37b4f1aa20e39c91b7753d08807e9b;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 c298ec40..30476339 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -716,6 +716,7 @@ jobs: name: Upload Coverage Reports runs-on: ubuntu-latest needs: cmake + if: cancelled() == false steps: - name: Checkout repository uses: actions/checkout@v4 @@ -730,16 +731,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 }}"