Skip to content

Commit

Permalink
tests: report coverage status for unittests
Browse files Browse the repository at this point in the history
This commit adds pytest-cov usage in unittests

Signed-off-by: Guillaume Abrioux <[email protected]>
  • Loading branch information
guits committed May 16, 2020
1 parent 886b525 commit 8d556b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ notifications:
webhooks: https://galaxy.ansible.com/api/v1/notifications/
install:
- pip install -r requirements.txt
- pip install ansible-lint pytest
- pip install ansible-lint pytest pytest-cov
script:
- if [[ -n $(grep --exclude-dir=.git -P "\xa0" -r .) ]]; then echo 'NBSP characters found'; exit 1; fi
- pytest -vvvv tests/library/ tests/plugins/filter/
- pytest --cov=library/ --cov=plugins/filter/ -vvvv tests/library/ tests/plugins/filter/
- for i in $(ls -1 roles/); do ANSIBLE_LOG_PATH=/dev/null ansible-lint -x 204 -v roles/$i/; if [ $? -ne 0 ]; then exit 1; fi; done

0 comments on commit 8d556b0

Please sign in to comment.