]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix codecov for pull requests.
authorHans Kristian Rosbach <hk-git@circlestorm.org>
Sat, 8 Feb 2020 15:22:14 +0000 (16:22 +0100)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Mon, 9 Mar 2020 13:13:36 +0000 (14:13 +0100)
Fail build if codecov fails.

.github/workflows/cmake.yml

index 7ea95618fb8bb79d4e98a0dc7ee246dbdbdec0eb..e18038b62258a417501bb1825287e51714888d2c 100644 (file)
@@ -325,10 +325,12 @@ jobs:
         LSAN_OPTIONS: ${{ matrix.lsan-options || 'verbosity=1' }}
 
     - name: Upload coverage report
-      if: matrix.codecov
+      if: matrix.codecov && ( env.CODECOV_TOKEN_SECRET != '' || github.repository == 'zlib-ng/zlib-ng' )
+      shell: bash
       run: |
         cd ${{ matrix.build-dir || '.' }}
-        python -m codecov -F "${{ matrix.codecov }}" --name "${{ matrix.name }}" --gcov-exec="${{ matrix.gcov-exec || 'gcov' }}"
+        python -m codecov --required --flags "${{ matrix.codecov }}" --name "${{ matrix.name }}" --gcov-exec="${{ matrix.gcov-exec || 'gcov' }}"
       env:
         # Codecov does not yet support GitHub Actions
-        CODECOV_TOKEN: "${{secrets.CODECOV_TOKEN}}"
\ No newline at end of file
+        CODECOV_TOKEN_SECRET: "${{secrets.CODECOV_TOKEN}}"
+        CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN || 'e4fdf847-f541-4ab1-9d50-3d27e5913906' }}"