Skip to content

Commit

Permalink
Change coverage to codecov (#124)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon T. Willard <[email protected]>
  • Loading branch information
OriolAbril and brandonwillard authored Oct 24, 2020
1 parent 7f1537c commit f375a0e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 28 deletions.
32 changes: 5 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
if [[ $FAST_COMPILE == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,mode=FAST_COMPILE; fi
if [[ $FLOAT32 == "1" ]]; then export THEANO_FLAGS=$THEANO_FLAGS,floatX=float32; fi
export THEANO_FLAGS=$THEANO_FLAGS,warn.ignore_bug_before=all,on_opt_error=raise,on_shape_error=raise,gcc.cxxflags=-pipe
python -m pytest -x -r A --verbose --runslow --cov=theano/ --cov-append --no-cov-on-fail $PART
python -m pytest -x -r A --verbose --runslow --cov=theano/ --cov-report=xml --no-cov-on-fail $PART
env:
MKL_THREADING_LAYER: GNU
MKL_NUM_THREADS: 1
Expand All @@ -149,33 +149,11 @@ jobs:
FAST_COMPILE: ${{ matrix.fast-compile }}
FLOAT32: ${{ matrix.float32 }}

- uses: actions/upload-artifact@v2
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
name: ${{ steps.unique-id.outputs.id }}
path: .coverage

coverage:
name: "Merge and upload coverage"
needs: test
runs-on: ubuntu-latest
if: ${{ needs.test.result == 'success' }}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Download all artifacts
uses: actions/download-artifact@v2
- name: Merge and upload coverage
run: |
python -m pip install coveralls
find . -name \.coverage -exec coverage combine --append {} \;
coveralls
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
fail_ci_if_error: true
name: "py${{ matrix.python-version }}: ${{ matrix.part }}"

combine:
if: ${{ always() }}
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,5 @@ Theano.suo
.ropeproject
core
.idea
/htmlcov/
.mypy_cache/
/htmlcov/
18 changes: 18 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
codecov:
require_ci_to_pass: true

comment:
behavior: default
branches:
- "master"

coverage:
status:
project:
default:
target: auto
threshold: 0%

patch:
default:
target: 100%

0 comments on commit f375a0e

Please sign in to comment.