mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-25 00:33:58 -04:00
Add code coverage
- generates a code coverage report - triggers Coveralls on every Travis build - adds a badge to the README
This commit is contained in:
1
.coveralls.yml
Normal file
1
.coveralls.yml
Normal file
@@ -0,0 +1 @@
|
|||||||
|
service_name: travis-pro
|
||||||
@@ -11,6 +11,7 @@ install:
|
|||||||
- npm rebuild node-sass
|
- npm rebuild node-sass
|
||||||
- pip install -r requirements_for_test.txt
|
- pip install -r requirements_for_test.txt
|
||||||
after_success:
|
after_success:
|
||||||
|
- coveralls
|
||||||
- ./scripts/trigger-dependent-build.sh
|
- ./scripts/trigger-dependent-build.sh
|
||||||
script:
|
script:
|
||||||
- npm run build
|
- npm run build
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
[](https://travis-ci.org/alphagov/notifications-admin)
|
[](https://travis-ci.org/alphagov/notifications-admin)
|
||||||
[](https://requires.io/github/alphagov/notifications-admin/requirements/?branch=master)
|
[](https://requires.io/github/alphagov/notifications-admin/requirements/?branch=master)
|
||||||
|
[](https://coveralls.io/github/alphagov/notifications-admin?branch=master)
|
||||||
|
|
||||||
|
|
||||||
[](https://github.com/alphagov/notifications-admin/compare/staging...master?expand=1&title=Deploy%20to%20staging) [](https://github.com/alphagov/notifications-admin/compare/live...staging?expand=1&title=Deploy%20to%20live)
|
[](https://github.com/alphagov/notifications-admin/compare/staging...master?expand=1&title=Deploy%20to%20staging) [](https://github.com/alphagov/notifications-admin/compare/live...staging?expand=1&title=Deploy%20to%20live)
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
pep8==1.5.7
|
pep8==1.5.7
|
||||||
pytest==2.8.1
|
pytest==2.8.1
|
||||||
pytest-mock==0.8.1
|
pytest-mock==0.8.1
|
||||||
|
pytest-cov==2.2.1
|
||||||
|
coveralls==1.1
|
||||||
moto==0.4.19
|
moto==0.4.19
|
||||||
httpretty==0.8.10
|
httpretty==0.8.10
|
||||||
beautifulsoup4==4.4.1
|
beautifulsoup4==4.4.1
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ npm test
|
|||||||
display_result $? 2 "Front end code style check"
|
display_result $? 2 "Front end code style check"
|
||||||
|
|
||||||
## Code coverage
|
## Code coverage
|
||||||
#py.test --cov=app tests/
|
py.test --cov=app --cov-report=term-missing tests/
|
||||||
#display_result $? 3 "Code coverage"
|
display_result $? 3 "Code coverage"
|
||||||
|
|
||||||
export NOTIFY_ADMIN_ENVIRONMENT='config.Test'
|
export NOTIFY_ADMIN_ENVIRONMENT='config.Test'
|
||||||
py.test -v
|
py.test -v
|
||||||
|
|||||||
Reference in New Issue
Block a user