diff options
author | Ratan Kulshreshtha <ratan.shreshtha@gmail.com> | 2021-10-26 17:16:50 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-26 06:46:50 -0500 |
commit | cd55f2fe98df4d499ab5c826433ee4995d3f6a60 (patch) | |
tree | 12976226283cba4d480c0d3b94a1547fd6f06429 | |
parent | 0cd098bad50046517cbd7caeb9660634e3fc84d0 (diff) | |
download | urllib3-cd55f2fe98df4d499ab5c826433ee4995d3f6a60.tar.gz |
Use codecov github action to upload coverage
-rw-r--r-- | .github/workflows/ci.yml | 10 | ||||
-rwxr-xr-x | ci/upload_coverage.sh | 21 |
2 files changed, 7 insertions, 24 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 130f374f..5fecb46d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,10 @@ jobs: NOX_SESSION: ${{ matrix.nox-session }} - name: Upload Coverage - run: ./ci/upload_coverage.sh - env: - JOB_NAME: "${{ runner.os }} (${{ matrix.python-version }})" + if: ${{ matrix.nox-session != 'unsupported_python2' }} + uses: codecov/codecov-action@v2 + with: + fail_ci_if_error: true + name: "${{ runner.os }} (${{ matrix.python-version }})" + files: ./coverage.xml + verbose: true diff --git a/ci/upload_coverage.sh b/ci/upload_coverage.sh deleted file mode 100755 index 7d0fee01..00000000 --- a/ci/upload_coverage.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -set -exo pipefail - -# Cribbed from Trio's ci.sh -function curl-harder() { - for BACKOFF in 0 1 2 4 8 15 15 15 15; do - sleep $BACKOFF - if curl -fL --connect-timeout 5 "$@"; then - return 0 - fi - done - return 1 -} - -if [ "$JOB_NAME" = "" ]; then - JOB_NAME="${TRAVIS_OS_NAME}-${TRAVIS_PYTHON_VERSION:-unknown}" -fi - -curl-harder -o codecov.sh https://codecov.io/bash -bash codecov.sh -f coverage.xml -n $JOB_NAME |