diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index fe6ece843..7b42c1294 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -41,18 +41,8 @@ jobs: uses: actions/checkout@v2 - name: Test run: ./ci/run_tests.sh ${{ matrix.test-env }} - env: - DO_COVERALLS: ${{ !contains(matrix.container, 'py3') }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_PARALLEL: true - COVERALLS_FLAG_NAME: test-${{ matrix.test-env }} - coveralls: - name: Coveralls Finished - needs: test - runs-on: ubuntu-latest - steps: - - name: Coveralls Finished - uses: coverallsapp/github-action@master - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - parallel-finished: true + - name: Upload Coverage + if: ${{ !contains(matrix.container, 'py3') }} + run: | + curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash || curl -o codecov.sh -f https://codecov.io/bash + bash codecov.sh -n "${{ matrix.test-env }} on ${{ matrix.container }}" diff --git a/ci/run_tests.sh b/ci/run_tests.sh index f7d2a865c..08e7ada08 100755 --- a/ci/run_tests.sh +++ b/ci/run_tests.sh @@ -26,17 +26,10 @@ fi [[ -d .git ]] || export SETUPTOOLS_SCM_PRETEND_VERSION="g$GITHUB_SHA" -$PIP install --upgrade git+https://github.com/TimoRoth/coveralls-python.git coverage git+https://github.com/fmaussion/salem.git +$PIP install --upgrade pytest-cov git+https://github.com/fmaussion/salem.git $PIP install -e . -coverage erase --rcfile=.coveragerc - -coverage run --rcfile=.coveragerc --source=./oggm --parallel-mode --module \ - pytest --verbose --mpl-upload $OGGM_MPL --run-slow --run-test-env $OGGM_TEST_ENV oggm - -coverage combine --rcfile=.coveragerc -coverage report --skip-covered --rcfile=.coveragerc - -if [[ $DO_COVERALLS == true ]]; then - coveralls -fi +pytest \ + --verbose \ + --cov-config="$PWD/.coveragerc" --cov-report=xml --cov=oggm \ + --mpl-upload $OGGM_MPL --run-slow --run-test-env $OGGM_TEST_ENV oggm