From c045d3aa566e081b0c06faca8b03454bf501d669 Mon Sep 17 00:00:00 2001 From: Christophe Hurpeau <302891+christophehurpeau@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:32:29 +0200 Subject: [PATCH] ci: fail ci if codecov error --- .github/workflows/push.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5a06122..66f57de 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -37,12 +37,7 @@ jobs: if: startsWith(matrix.node-version, '20.') - name: Generate Test Coverage - run: | - if [ -z "$CODECOV_TOKEN" ]; then - echo "Missing env variable CODECOV_TOKEN" - exit 1 - fi - yarn run test:coverage:json + run: yarn run test:coverage:json if: startsWith(matrix.node-version, '20.') env: CI: true @@ -50,6 +45,7 @@ jobs: - name: Send results to codecov uses: codecov/codecov-action@v4 with: + fail_ci_if_error: true token: ${{ secrets.CODECOV_TOKEN }} if: startsWith(matrix.node-version, '20.')