Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f105fd9

Browse files
Add tests for Ansible core 2.17 (devel is 2.18 today) and bump tests dependencies (ansible-collections#623)
* Add tests for Ansible core 2.17 (devel is 2.18 today) * Drop tests for Ansible core 2.14 and add 2.17 * Cut duplicate exclude * Add back python 3.8 and 3.9 for stable2.15 * Bump action to prevent deprecation warnings * Cut python 3.9 for devel in roles tests * Attempt to fix GHA line folding * fix typo * Bump ubuntu Latest ansible-test doesn't work with old ubuntu. See here for more info: https://github.com/ansible-collections/collection_template/blob/main/.github/workflows/ansible-test.yml#L83-L91 * fix docker_image var assignation * fix yamllint false positive * Attempt to fix docker_image_multiline assignation * Fix empty var due to scope of each command * Attempt to fix docker_image assignation * fix error "vars should be dict" * Document URL of the repository for the action ansible-test-gh-action * Disable role tests * Document ansible-core version tested * Cut ansible-core 2.14 from testing documentation
1 parent bfe2fdc commit f105fd9

21 files changed

+58
-62
lines changed

.github/workflows/ansible-test-plugins.yml

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Plugins CI
3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
55
paths:
66
- 'plugins/**'
@@ -18,15 +18,16 @@ on:
1818
jobs:
1919
sanity:
2020
name: "Sanity (Ansible: ${{ matrix.ansible }})"
21-
runs-on: ubuntu-20.04
21+
runs-on: ubuntu-22.04
2222
strategy:
2323
matrix:
2424
ansible:
25-
- stable-2.14
2625
- stable-2.15
2726
- stable-2.16
27+
- stable-2.17
2828
- devel
2929
steps:
30+
# https://github.com/ansible-community/ansible-test-gh-action
3031
- name: Perform sanity testing
3132
uses: ansible-community/ansible-test-gh-action@release/v1
3233
with:
@@ -36,14 +37,14 @@ jobs:
3637

3738
integration:
3839
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, DB: ${{ matrix.db_engine_name }} ${{ matrix.db_engine_version }}, connector: ${{ matrix.connector_name }} ${{ matrix.connector_version }})"
39-
runs-on: ubuntu-20.04
40+
runs-on: ubuntu-22.04
4041
strategy:
4142
fail-fast: false
4243
matrix:
4344
ansible:
44-
- stable-2.14
4545
- stable-2.15
4646
- stable-2.16
47+
- stable-2.17
4748
- devel
4849
db_engine_name:
4950
- mysql
@@ -111,9 +112,6 @@ jobs:
111112
- db_engine_version: 5.7.40
112113
python: '3.10'
113114

114-
- db_engine_version: 5.7.40
115-
ansible: stable-2.14
116-
117115
- db_engine_version: 5.7.40
118116
ansible: stable-2.15
119117

@@ -126,9 +124,6 @@ jobs:
126124
- db_engine_version: 8.0.31
127125
python: '3.8'
128126

129-
- db_engine_version: 8.0.31
130-
python: '3.8'
131-
132127
- db_engine_version: 10.4.27
133128
python: '3.10'
134129

@@ -175,22 +170,19 @@ jobs:
175170
connector_version: 2.0.3
176171

177172
- python: '3.8'
178-
ansible: stable-2.14
173+
ansible: stable-2.16
179174

180175
- python: '3.8'
181-
ansible: stable-2.15
182-
183-
- python: '3.8'
184-
ansible: stable-2.16
176+
ansible: stable-2.17
185177

186178
- python: '3.8'
187179
ansible: devel
188180

189181
- python: '3.9'
190-
ansible: stable-2.15
182+
ansible: stable-2.16
191183

192184
- python: '3.9'
193-
ansible: stable-2.16
185+
ansible: stable-2.17
194186

195187
- python: '3.9'
196188
ansible: devel
@@ -284,16 +276,12 @@ jobs:
284276
fi
285277
286278
- name: Set docker_image
287-
run: >
288-
docker_image_multiline=("
289-
ghcr.io/ansible-collections/community.mysql\
279+
run: |-
280+
echo "docker_image=ghcr.io/ansible-collections/community.mysql\
290281
/test-container-${{ env.db_client }}\
291282
-py${{ env.python_version_flat }}\
292283
-${{ matrix.connector_name }}${{ env.connector_version_flat }}\
293-
:latest")
294-
295-
echo "docker_image=$(printf '%s' $docker_image_multiline)"
296-
>> $GITHUB_ENV
284+
:latest" >> $GITHUB_ENV
297285
298286
- name: >-
299287
Perform integration testing against
@@ -332,28 +320,28 @@ jobs:
332320
testing-type: integration
333321
334322
units:
335-
runs-on: ubuntu-20.04
323+
runs-on: ubuntu-22.04
336324
name: Units (Ⓐ${{ matrix.ansible }})
337325
strategy:
338326
# As soon as the first unit test fails,
339327
# cancel the others to free up the CI queue
340328
fail-fast: true
341329
matrix:
342330
ansible:
343-
- stable-2.14
344331
- stable-2.15
345332
- stable-2.16
333+
- stable-2.17
346334
- devel
347335
python:
348336
- 3.8
349337
- 3.9
350338
exclude:
351-
- python: '3.8'
352-
ansible: stable-2.14
353339
- python: '3.8'
354340
ansible: stable-2.15
355341
- python: '3.8'
356342
ansible: stable-2.16
343+
- python: '3.8'
344+
ansible: stable-2.17
357345
- python: '3.8'
358346
ansible: devel
359347

.github/workflows/ansible-test-roles.yml renamed to .github/workflows/ansible-test-roles.yml.off

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Roles CI
3-
on:
3+
on: # yamllint disable-line rule:truthy
44
push:
55
paths:
66
- 'roles/**'
@@ -15,7 +15,7 @@ on:
1515
jobs:
1616
molecule:
1717
name: "Molecule (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.mysql }})"
18-
runs-on: ubuntu-20.04
18+
runs-on: ubuntu-22.04
1919
env:
2020
PY_COLORS: 1
2121
ANSIBLE_FORCE_COLOR: 1
@@ -24,26 +24,36 @@ jobs:
2424
mysql:
2525
- 2.0.12
2626
ansible:
27-
- stable-2.13
28-
- stable-2.14
2927
- stable-2.15
28+
- stable-2.16
29+
- stable-2.17
3030
- devel
3131
python:
32-
- 3.8
33-
- 3.9
32+
- '3.8'
33+
- '3.9'
34+
- '3.10'
3435
exclude:
3536
- python: 3.8
37+
ansible: stable-2.17
38+
39+
- python: 3.9
40+
ansible: stable-2.17
41+
42+
- python: 3.8
43+
ansible: devel
44+
45+
- python: 3.9
3646
ansible: devel
3747

3848
steps:
3949

4050
- name: Check out code
41-
uses: actions/checkout@v2
51+
uses: actions/checkout@v3
4252
with:
4353
path: ansible_collections/community/mysql
4454

4555
- name: Set up Python ${{ matrix.python }}
46-
uses: actions/setup-python@v2
56+
uses: actions/setup-python@v4
4757
with:
4858
python-version: ${{ matrix.python }}
4959

.github/workflows/build-docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Build Docker Image for ansible-test
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
workflow_call:
66
inputs:
77
registry:

.github/workflows/docker-image-mariadb-py310-mysqlclient211.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI mariadb-py310-mysqlclient211
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/mariadb-py310-mysqlclient211/**'

.github/workflows/docker-image-mariadb-py310-pymysql102.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI mariadb-py310-pymysql102
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/mariadb-py310-pymysql102/**'

.github/workflows/docker-image-mariadb-py38-mysqlclient201.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI mariadb-py38-mysqlclient201
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/mariadb-py38-mysqlclient201/**'

.github/workflows/docker-image-mariadb-py38-pymysql093.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI mariadb-py38-pymysql093
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/mariadb-py38-pymysql093/**'

.github/workflows/docker-image-mariadb-py39-mysqlclient203.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI mariadb-py39-mysqlclient203
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/mariadb-py39-mysqlclient203/**'

.github/workflows/docker-image-mariadb-py39-pymysql093.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI mariadb-py39-pymysql093
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/mariadb-py39-pymysql093/**'

.github/workflows/docker-image-my57-py38-mysqlclient201.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: Docker Image CI my57-py38-mysqlclient201
33

4-
on:
4+
on: # yamllint disable-line rule:truthy
55
push:
66
paths:
77
- 'test-containers/my57-py38-mysqlclient201/**'

0 commit comments

Comments
 (0)