@@ -13,107 +13,72 @@ env:
13
13
14
14
matrix :
15
15
include :
16
- - name : " Python 3.6 - units "
16
+ - name : " Python 3.6 - Netbox 2.5 "
17
17
python : 3.6
18
- env : PYTHON_VER=3.6
18
+ env : PYTHON_VER=3.6 VERSION=v2.5
19
19
install :
20
20
- pip install -U pip
21
21
- pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.3b0
22
+ - pip install pynetbox==4.0.6 cryptography codecov
22
23
- cd ../../
23
24
# This is due to ansible-test only being available within devel branch
24
25
- git clone https://github.com/ansible/ansible.git
25
26
- cd ansible
26
27
- git checkout stable-2.9
27
28
- source hacking/env-setup
28
29
- cd ..
29
-
30
- before_script :
31
- - mkdir -p ~/ansible_collections/$COLLECTION_NAMESPACE
32
- - mv FragmentedPacket/$COLLECTION_NAME ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
33
- - cd ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
34
-
35
- script :
36
- - ansible-test units --python $PYTHON_VER -vvv
37
- - black . --check
38
-
39
- - name : " Python 3.7 - units"
40
- python : 3.7
41
- env : PYTHON_VER=3.7
42
- install :
43
- - pip install -U pip
44
- - pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.3b0
45
- - cd ../../
46
- # This is due to ansible-test only being available within devel branch
47
- - git clone https://github.com/ansible/ansible.git
48
- - cd ansible
49
- - git checkout stable-2.9
50
- - source hacking/env-setup
51
- - cd ..
52
-
53
- before_script :
54
- - mkdir -p ~/ansible_collections/$COLLECTION_NAMESPACE
55
- - mv FragmentedPacket/$COLLECTION_NAME ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
56
- - cd ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
57
-
58
- script :
59
- - ansible-test units --python $PYTHON_VER -vvv
60
- - black . --check
61
-
62
- - name : " Python 3.6 / Netbox 2.5 - integration"
63
- python : 3.6
64
- # This is set and used by netbox-docker to pull the correct Netbox image
65
- env : VERSION=v2.5
66
- install :
67
- - pip install -U pip
68
- - pip install jinja2 PyYAML pynetbox==4.0.6 cryptography
69
- - cd ../../
70
- - git clone https://github.com/ansible/ansible.git
71
- - cd ansible
72
- - git checkout stable-2.9
73
- - source hacking/env-setup
74
- - cd ..
30
+ # Setup netbox container for integration testing
75
31
- git clone https://github.com/netbox-community/netbox-docker.git
76
32
- cd netbox-docker
77
33
- docker-compose --verbose pull
78
34
- docker-compose --verbose up -d
79
35
- cd ..
80
-
36
+
81
37
before_script :
82
- - cd FragmentedPacket/netbox_modules
83
- - mkdir ansible_collections
38
+ - mkdir -p ~/ansible_collections/$COLLECTION_NAMESPACE
39
+ - cp -R FragmentedPacket/$COLLECTION_NAME ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
40
+ - cd ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
84
41
- ansible-galaxy collection build .
85
42
- ansible-galaxy collection install $COLLECTION_NAMESPACE-$COLLECTION_NAME-$COLLECTION_VERSION.tar.gz -p /home/travis/.ansible/collections
86
-
43
+
87
44
script :
45
+ - ansible-test units --python $PYTHON_VER -vvv
46
+ - black . --check
88
47
- " sleep 60"
89
48
- python tests/integration/netbox-deploy.py
90
49
- ansible-playbook tests/integration/integration-tests.yml -v
91
50
92
- - name : " Python 3.6 / Netbox 2.6 - integration "
51
+ - name : " Python 3.6 - Netbox 2.6"
93
52
python : 3.6
94
- # This is set and used by netbox-docker to pull the correct Netbox image
95
- env : VERSION=v2.6
53
+ env : PYTHON_VER=3.6 VERSION=v2.6
96
54
install :
97
55
- pip install -U pip
98
- - pip install jinja2 PyYAML pynetbox==4.0.6 cryptography
56
+ - pip install pytest==4.6.5 pytest-mock pytest-xdist jinja2 PyYAML black==19.3b0
57
+ - pip install pynetbox==4.0.6 cryptography
99
58
- cd ../../
59
+ # This is due to ansible-test only being available within devel branch
100
60
- git clone https://github.com/ansible/ansible.git
101
61
- cd ansible
102
62
- git checkout stable-2.9
103
63
- source hacking/env-setup
104
64
- cd ..
65
+ # Setup netbox container for integration testing
105
66
- git clone https://github.com/netbox-community/netbox-docker.git
106
67
- cd netbox-docker
107
68
- docker-compose --verbose pull
108
69
- docker-compose --verbose up -d
109
70
- cd ..
110
71
111
72
before_script :
112
- - cd FragmentedPacket/netbox_modules
73
+ - mkdir -p ~/ansible_collections/$COLLECTION_NAMESPACE
74
+ - cp -R FragmentedPacket/$COLLECTION_NAME ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
75
+ - cd ~/ansible_collections/$COLLECTION_NAMESPACE/$COLLECTION_NAME
113
76
- ansible-galaxy collection build .
114
77
- ansible-galaxy collection install $COLLECTION_NAMESPACE-$COLLECTION_NAME-$COLLECTION_VERSION.tar.gz -p /home/travis/.ansible/collections
115
-
78
+
116
79
script :
80
+ - ansible-test units --python $PYTHON_VER -vv
81
+ - black . --check
117
82
- " sleep 60"
118
83
- python tests/integration/netbox-deploy.py
119
84
- ansible-playbook tests/integration/integration-tests.yml -v
0 commit comments