From 89ce829b44274569de83173867ce29828b620fe8 Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 19 Apr 2024 15:04:50 +0300 Subject: [PATCH] ci: replace upload-coverage script with codecov github action Same as what pytest does, hopefully will fix coverage upload failures. --- .github/workflows/main.yml | 9 ++++++--- scripts/upload-coverage.sh | 16 ---------------- 2 files changed, 6 insertions(+), 19 deletions(-) delete mode 100755 scripts/upload-coverage.sh diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ee5d9de..d8c0b181 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -110,9 +110,12 @@ jobs: - name: Upload coverage if: matrix.use_coverage && github.repository == 'pytest-dev/pluggy' - env: - CODECOV_NAME: ${{ matrix.name }} - run: bash scripts/upload-coverage.sh -F GHA,${{ runner.os }} + uses: codecov/codecov-action@v4 + continue-on-error: true + with: + fail_ci_if_error: true + files: ./coverage.xml + verbose: true deploy: if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && github.repository == 'pytest-dev/pluggy' diff --git a/scripts/upload-coverage.sh b/scripts/upload-coverage.sh deleted file mode 100755 index ad3dd482..00000000 --- a/scripts/upload-coverage.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -x - -if [ -z "$TOXENV" ]; then - python -m pip install coverage -else - # Add last TOXENV to $PATH. - PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH" -fi - -python -m coverage xml -# Set --connect-timeout to work around https://github.com/curl/curl/issues/4461 -curl -S -L --connect-timeout 5 --retry 6 -s https://codecov.io/bash -o codecov-upload.sh -bash codecov-upload.sh -Z -X fix -f coverage.xml "$@"