-
Notifications
You must be signed in to change notification settings - Fork 631
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I believe that we should be able to see the test coverage. These changes: - make tests use pytest - add displaying of the test coverage - add sending of collected coverage data to https://codecov.io
- Loading branch information
Showing
5 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[run] | ||
omit = | ||
*/tests/* | ||
*/setup.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ venv*/ | |
pip-log.txt | ||
|
||
# Unit test / coverage reports | ||
coverage.xml | ||
.coverage | ||
.nox | ||
.tox | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
function cov { | ||
pytest "${1}/tests" \ | ||
--cov opentelemetry-api \ | ||
--cov opentelemetry-sdk \ | ||
--cov ext \ | ||
--cov examples \ | ||
--cov-append \ | ||
--cov-branch \ | ||
--cov-report= | ||
} | ||
|
||
|
||
coverage erase | ||
|
||
cov opentelemetry-api | ||
cov opentelemetry-sdk | ||
cov ext/opentelemetry-ext-http-requests | ||
cov ext/opentelemetry-ext-jaeger | ||
cov ext/opentelemetry-ext-wsgi | ||
cov examples/opentelemetry-example-app | ||
|
||
coverage report | ||
coverage xml | ||
|
||
codecov -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[pytest] | ||
addopts = -rs -v |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters