66 schedule :
77 # * is a special character in YAML so you have to quote this string
88 - cron : ' 0 8 * * *'
9+ env :
10+ python_version : 3.9
911jobs :
1012 build :
1113 name : Build collection
1214 runs-on : ubuntu-latest
1315 strategy :
1416 fail-fast : false
1517 matrix :
16- ansible : [2 .9.27, 2 .10.17, 2 .11.12, 2 .12.10, 2.13.7, 2.14.1 ]
18+ ansible : [v2 .9.27, v2 .10.17, v2 .11.12, v2 .12.10, stable- 2.13, stable- 2.14]
1719 steps :
1820 - name : Check out code
1921 uses : actions/checkout@v3
2022
21- - name : Set up Python 3.8
23+ - name : Set up Python ${{ env.python_version }}
2224 uses : actions/setup-python@v4
2325 with :
24- python-version : 3.8
26+ python-version : ${{ env.python_version }}
2527
26- - name : Install ansible-base (v ${{ matrix.ansible }})
27- run : pip install https://github.com/ansible/ansible/archive/v ${{ matrix.ansible }}.tar.gz --disable-pip-version-check
28+ - name : Install ansible-base (${{ matrix.ansible }})
29+ run : pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
2830
2931 - name : Build a collection tarball
3032 run : ansible-galaxy collection build --output-path "${GITHUB_WORKSPACE}/.cache/collection-tarballs"
@@ -40,28 +42,31 @@ jobs:
4042 runs-on : ubuntu-latest
4143 continue-on-error : true
4244 strategy :
45+ fail-fast : false
4346 matrix :
44- experimental : true
47+ experimental : [ true]
4548 steps :
4649 - name : Check out code
47- uses : actions/checkout@v2
50+ uses : actions/checkout@v3
51+
4852 - name : Run black against code
4953 uses : psf/black@stable
50- options : " --check --diff --color -l 159"
54+ with :
55+ options : " --check --diff --color -l 159"
5156
5257 importer :
5358 name : Galaxy-importer check
5459 needs :
5560 - build
5661 runs-on : ubuntu-latest
5762 steps :
58- - name : Set up Python 3.8
63+ - name : Set up Python ${{ env.python_version }}
5964 uses : actions/setup-python@v4
6065 with :
61- python-version : 3.8
66+ python-version : ${{ env.python_version }}
6267
63- - name : Install ansible-base (v2 .14.1 )
64- run : pip install https://github.com/ansible/ansible/archive/v2 .14.1 .tar.gz --disable-pip-version-check
68+ - name : Install ansible-base (stable-2 .14)
69+ run : pip install https://github.com/ansible/ansible/archive/stable-2 .14.tar.gz --disable-pip-version-check
6570
6671 - name : Download migrated collection artifacts
6772 uses : actions/download-artifact@v3
@@ -102,15 +107,15 @@ jobs:
102107 strategy :
103108 fail-fast : false
104109 matrix :
105- ansible : [2 .9.27, 2 .10.17, 2 .11.12, 2 .12.10, 2.13.7, 2.14.1 ]
110+ ansible : [v2 .9.27, v2 .10.17, v2 .11.12, v2 .12.10, stable- 2.13, stable- 2.14]
106111 steps :
107- - name : Set up Python 3.8
112+ - name : Set up Python ${{ env.python_version }}
108113 uses : actions/setup-python@v4
109114 with :
110- python-version : 3.8
115+ python-version : ${{ env.python_version }}
111116
112- - name : Install ansible-base (v ${{ matrix.ansible }})
113- run : pip install https://github.com/ansible/ansible/archive/v ${{ matrix.ansible }}.tar.gz --disable-pip-version-check
117+ - name : Install ansible-base (${{ matrix.ansible }})
118+ run : pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
114119
115120 - name : Install coverage (v4.5.4)
116121 run : pip install coverage==4.5.4
@@ -125,15 +130,15 @@ jobs:
125130 run : ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
126131
127132 - name : Run sanity tests
128- run : ansible-test sanity --docker -v --color --truncate 0
133+ run : ansible-test sanity --docker -v --color --truncate 0 --coverage
129134 working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
130135
131136 - name : Generate coverage report
132137 run : ansible-test coverage xml -v --requirements --group-by command --group-by version
133138 working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
134139
135140 - name : Push coverate report to codecov.io
136- run : bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
141+ run : bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F sanity
137142 working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
138143
139144 units :
@@ -144,15 +149,19 @@ jobs:
144149 strategy :
145150 fail-fast : false
146151 matrix :
147- ansible : [2.9.27, 2.10.17, 2.11.12, 2.12.10, 2.13.7, 2.14.1]
152+ ansible : [v2.10.17, v2.11.12, v2.12.10, stable-2.13, stable-2.14]
153+ python-version : [3.9]
154+ include :
155+ - ansible : v2.9.27
156+ python-version : 3.8
148157 steps :
149- - name : Set up Python 3.8
158+ - name : Set up Python ${{ matrix.python-version }}
150159 uses : actions/setup-python@v4
151160 with :
152- python-version : 3.8
161+ python-version : ${{ matrix.python-version }}
153162
154- - name : Install ansible-base (v ${{ matrix.ansible }})
155- run : pip install https://github.com/ansible/ansible/archive/v ${{ matrix.ansible }}.tar.gz --disable-pip-version-check
163+ - name : Install ansible-base (${{ matrix.ansible }})
164+ run : pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible }}.tar.gz --disable-pip-version-check
156165
157166 - name : Install coverage (v4.5.4)
158167 run : pip install coverage==4.5.4
@@ -166,31 +175,31 @@ jobs:
166175 - name : Install the collection tarball
167176 run : ansible-galaxy collection install .cache/collection-tarballs/*.tar.gz
168177
169- - name : Run unit tests
170- run : ansible-test units --docker -v --color --truncate 0 --python 3.8 --coverage
171- working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
178+ # - name: Run unit tests
179+ # run: ansible-test units --docker -v --color --truncate 0 --python ${{ matrix.python-version }} --coverage
180+ # working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
172181
173- - name : Generate coverage report.
174- run : ansible-test coverage xml -v --requirements --group-by command --group-by version
175- working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
182+ # - name: Generate coverage report.
183+ # run: ansible-test coverage xml -v --requirements --group-by command --group-by version
184+ # working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
176185
177- - name : Push coverate report to codecov.io
178- run : bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
179- working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
186+ # - name: Push coverate report to codecov.io
187+ # run: bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F unit
188+ # working-directory: /home/runner/.ansible/collections/ansible_collections/cisco/aci
180189
181190 integration :
182191 name : Integration in ubuntu-latest
183192 needs :
184193 - build
185194 runs-on : ubuntu-latest
186195 steps :
187- - name : Set up Python 3.8
196+ - name : Set up Python ${{ env.python_version }}
188197 uses : actions/setup-python@v4
189198 with :
190- python-version : 3.8
199+ python-version : ${{ env.python_version }}
191200
192- - name : Install ansible-base (v2.11.9 )
193- run : pip install https://github.com/ansible/ansible/archive/v2.11.9 .tar.gz --disable-pip-version-check
201+ - name : Install ansible-base (stable-2.13 )
202+ run : pip install https://github.com/ansible/ansible/archive/stable-2.13 .tar.gz --disable-pip-version-check
194203
195204 - name : Install coverage (v4.5.4)
196205 run : pip install coverage==4.5.4
@@ -207,26 +216,28 @@ jobs:
207216 - name : Requesting integration mutex
208217 uses : nev7n/wait_for_response@v1
209218 with :
210- url : ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci?repo={0}', github.repository) }}
219+ url : ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci?repo={0}&run_id={1} ', github.repository, github.run_id ) }}
211220 responseCode : 200
212221 timeout : 2000000
213222 interval : 5000
214223
215- - name : Run integration tests on Python 3.8
216- run : ansible-test network-integration --docker -v --color --retry-on-error --python 3.8 --truncate 0 --continue-on-error --coverage
224+ - name : Run integration tests on Python ${{ env.python_version }}
225+ run : ansible-test network-integration --docker -v --color --retry-on-error --python ${{ env.python_version }} --truncate 0 --continue-on-error --coverage
217226 working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
218227
219228 - name : Releasing integration mutex
220229 uses : nev7n/wait_for_response@v1
221230 if : always()
222231 with :
223- url : ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci/release?repo={0}', github.repository) }}
232+ url : ${{ format('https://8v7s765ibh.execute-api.us-west-1.amazonaws.com/v1/ansible-aci/release?repo={0}&run_id={1} ', github.repository, github.run_id ) }}
224233 responseCode : 200
225234
226235 - name : Generate coverage report
236+ if : always()
227237 run : ansible-test coverage xml -v --requirements --group-by command --group-by version
228238 working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
229239
230240 - name : Push coverate report to codecov.io
241+ if : always()
231242 run : bash <(curl -s https://codecov.io/bash) -s 'tests/output/reports/' -F integration
232243 working-directory : /home/runner/.ansible/collections/ansible_collections/cisco/aci
0 commit comments