Skip to content

Commit 36c6b16

Browse files
Inventory: Separate query_filters for devices and vms #140 (#153)
1 parent 9bdafac commit 36c6b16

File tree

10 files changed

+645
-66
lines changed

10 files changed

+645
-66
lines changed

.travis.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ jobs:
2828
- docker-compose up -d
2929
- cd ..
3030
- pip install -U pip
31-
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0
31+
# coverage 5.0 is not compatible with ansible-test https://github.com/ansible/ansible/issues/65907
32+
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5"
3233
- pip install pynetbox cryptography codecov jmespath ansible
3334

3435
# Latest release of Netbox and Ansible
@@ -44,7 +45,7 @@ jobs:
4445
- docker-compose up -d
4546
- cd ..
4647
- pip install -U pip
47-
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0
48+
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5"
4849
- pip install pynetbox cryptography codecov jmespath ansible
4950

5051
# Latest development versions of Netbox and Ansible, newest Python
@@ -62,7 +63,7 @@ jobs:
6263
- docker-compose up -d
6364
- cd ..
6465
- pip install -U pip
65-
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0
66+
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5"
6667
- pip install pynetbox cryptography jmespath
6768
- git clone https://github.com/ansible/ansible.git
6869
- cd ansible
@@ -82,7 +83,7 @@ before_script:
8283
script:
8384
# Perform unit tests on collection from within the installed directory, not the source directory
8485
# Required for imports of other collections (ie. ansible.netcommon) to work correctly
85-
- (cd /home/travis/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME && ansible-test units --python $PYTHON_VER -v)
86+
- (cd /home/travis/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME && ansible-test units --coverage --python $PYTHON_VER -v)
8687

8788
# Check python syntax
8889
- black . --check --diff
@@ -98,6 +99,9 @@ script:
9899
- ansible-playbook tests/integration/$VERSION/main.yml -vvvv
99100
- ansible-inventory -i tests/integration/test-inventory.yml --list
100101

102+
# Report code coverage
103+
- (cd /home/travis/.ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME && ansible-test coverage report)
104+
101105
deploy:
102106
provider: script
103107
skip_cleanup: true

0 commit comments

Comments
 (0)