@@ -27,10 +27,11 @@ jobs:
27
27
- docker-compose pull
28
28
- docker-compose up -d
29
29
- cd ..
30
- - pip install -U pip
30
+ # setuptools <46.1.3 has issues with ansible-test executables https://github.com/ansible/ansible/issues/68963
31
+ - pip install -U pip "setuptools>=46.1.3"
31
32
# coverage 5.0 is not compatible with ansible-test https://github.com/ansible/ansible/issues/65907
32
33
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5"
33
- - pip install pynetbox cryptography codecov jmespath ansible
34
+ - pip install pynetbox cryptography codecov jmespath jsondiff ansible
34
35
35
36
# Latest release of Netbox and Ansible
36
37
- name : " Python 3.6 - Netbox 2.7 - Latest PyPi Ansible"
44
45
- docker-compose pull
45
46
- docker-compose up -d
46
47
- cd ..
47
- - pip install -U pip
48
+ - pip install -U pip "setuptools>=46.1.3"
48
49
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5"
49
- - pip install pynetbox cryptography codecov jmespath ansible
50
+ - pip install pynetbox cryptography codecov jmespath jsondiff ansible
50
51
51
52
# Latest development versions of Netbox and Ansible, newest Python
52
53
# This may be broken sometimes by changes in the netbox & ansible projects
62
63
- docker-compose pull
63
64
- docker-compose up -d
64
65
- cd ..
65
- - pip install -U pip
66
+ - pip install -U pip "setuptools>=46.1.3"
66
67
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.10b0 "coverage<5"
67
- - pip install pynetbox cryptography jmespath
68
+ - pip install pynetbox cryptography jmespath jsondiff
68
69
- git clone https://github.com/ansible/ansible.git
69
70
- cd ansible
70
71
- source hacking/env-setup
@@ -83,7 +84,7 @@ before_script:
83
84
script :
84
85
# Perform unit tests on collection from within the installed directory, not the source directory
85
86
# Required for imports of other collections (ie. ansible.netcommon) to work correctly
86
- - (cd /home/travis/. ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME && ansible -test units --coverage --python $PYTHON_VER -v)
87
+ - ansible-test units --coverage --python $PYTHON_VER -v
87
88
88
89
# Check python syntax
89
90
- black . --check --diff
@@ -95,13 +96,18 @@ script:
95
96
- python tests/integration/netbox-deploy.py
96
97
97
98
# Run regression and integration tests
99
+ # Run the inventory test first, in case any of the other tests modify the data.
100
+
101
+ # Run this inventory integration test from the source directory (not the installed directory),
102
+ # otherwise runme.sh will not have execute permissions. Should be fixed in Ansible 2.10
103
+ # https://github.com/ansible/ansible/issues/68415
104
+ - ansible-test integration -vvvv --coverage --local inventory
105
+
98
106
- ansible-playbook tests/integration/regression-tests.yml -vvvv
99
107
- ansible-playbook tests/integration/$VERSION/main.yml -vvvv
100
- - ansible-inventory -vvvv -i tests/integration/test-inventory.yml --list
101
- - ansible-inventory -vvvv -i tests/integration/test-inventory-plurals.yml --list
102
108
103
109
# Report code coverage
104
- - (cd /home/travis/. ansible/collections/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME && ansible -test coverage report)
110
+ - ansible-test coverage report
105
111
106
112
deploy :
107
113
provider : script
0 commit comments