Use codecov github action to upload coverage
MODIFY
.github/workflows/ci.yml
.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

DELETE
ci/upload_coverage.sh
-#!/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

Use codecov github action to upload coverage