Skip to content

Commit d4ae346

Browse files
author
Ignacio Quintero
committed
Enforce 90% Code Coverage for Unit Tests.
1 parent 6b809eb commit d4ae346

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ language: python
22
python:
33
- '2.7'
44
- '3.5'
5-
install: pip install tox-travis
5+
install: pip install tox-travis codecov
66
script:
77
- tox tests/unit
8+
after_success:
9+
- codecov
10+

tox.ini

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@ passenv =
3232
AWS_ACCESS_KEY_ID
3333
AWS_SECRET_ACCESS_KEY
3434
AWS_SESSION_TOKEN
35+
COVERAGE_THRESHOLD
3536
# {posargs} can be passed in by additional arguments specified when invoking tox.
3637
# Can be used to specify which tests to run, e.g.: tox -- -s
3738
commands =
38-
pytest {posargs}
39+
coverage run --source sagemaker -m py.test {posargs}
40+
coverage report --fail-under={env:COVERAGE_THRESHOLD:90} --omit */tensorflow/tensorflow_serving/*
3941
deps =
4042
pytest
4143
pytest-cov

0 commit comments

Comments
 (0)