add code coverage

This commit is contained in:
thomwolf
2019-04-30 11:05:26 +02:00
parent c30139a013
commit 1f5fc95b68
2 changed files with 14 additions and 3 deletions

View File

@@ -7,9 +7,11 @@ jobs:
steps:
- checkout
- run: sudo pip install --progress-bar off .
- run: sudo pip install pytest ftfy spacy
- run: sudo pip install pytest codecov pytest-cov
- run: sudo pip install spacy ftfy==4.4.3
- run: sudo python -m spacy download en
- run: python -m pytest -sv tests/ --runslow
- run: codecov
build_py2:
working_directory: ~/pytorch-pretrained-BERT
docker:
@@ -17,10 +19,11 @@ jobs:
steps:
- checkout
- run: sudo pip install --progress-bar off .
- run: sudo pip install pytest spacy
- run: sudo pip install ftfy==4.4.3
- run: sudo pip install pytest codecov pytest-cov
- run: sudo pip install spacy ftfy==4.4.3
- run: sudo python -m spacy download en
- run: python -m pytest -sv tests/ --runslow
- run: codecov
workflows:
version: 2
build_and_test:

8
.coveragerc Normal file
View File

@@ -0,0 +1,8 @@
[run]
source=pytorch_pretrained_bert
[report]
exclude_lines =
pragma: no cover
raise
except
register_parameter