Skip to content

Commit

Permalink
Try codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
TimoRoth committed Jun 9, 2020
1 parent 0d4afef commit 53b3797
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 27 deletions.
20 changes: 5 additions & 15 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}"
17 changes: 5 additions & 12 deletions ci/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 53b3797

Please sign in to comment.