Add tests for Ansible core 2.17 (devel is 2.18 today) and bump tests dependencies (#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
This commit is contained in:
Laurent Indermühle 2024-04-11 10:46:43 +02:00 committed by GitHub
commit f105fd9a95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
21 changed files with 59 additions and 63 deletions

View file

@ -1,6 +1,6 @@
---
name: Plugins CI
on:
on: # yamllint disable-line rule:truthy
push:
paths:
- 'plugins/**'
@ -18,15 +18,16 @@ on:
jobs:
sanity:
name: "Sanity (Ansible: ${{ matrix.ansible }})"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
matrix:
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
- stable-2.17
- devel
steps:
# https://github.com/ansible-community/ansible-test-gh-action
- name: Perform sanity testing
uses: ansible-community/ansible-test-gh-action@release/v1
with:
@ -36,14 +37,14 @@ jobs:
integration:
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, DB: ${{ matrix.db_engine_name }} ${{ matrix.db_engine_version }}, connector: ${{ matrix.connector_name }} ${{ matrix.connector_version }})"
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
- stable-2.17
- devel
db_engine_name:
- mysql
@ -111,9 +112,6 @@ jobs:
- db_engine_version: 5.7.40
python: '3.10'
- db_engine_version: 5.7.40
ansible: stable-2.14
- db_engine_version: 5.7.40
ansible: stable-2.15
@ -126,9 +124,6 @@ jobs:
- db_engine_version: 8.0.31
python: '3.8'
- db_engine_version: 8.0.31
python: '3.8'
- db_engine_version: 10.4.27
python: '3.10'
@ -174,23 +169,20 @@ jobs:
- python: '3.10'
connector_version: 2.0.3
- python: '3.8'
ansible: stable-2.14
- python: '3.8'
ansible: stable-2.15
- python: '3.8'
ansible: stable-2.16
- python: '3.8'
ansible: stable-2.17
- python: '3.8'
ansible: devel
- python: '3.9'
ansible: stable-2.15
ansible: stable-2.16
- python: '3.9'
ansible: stable-2.16
ansible: stable-2.17
- python: '3.9'
ansible: devel
@ -284,16 +276,12 @@ jobs:
fi
- name: Set docker_image
run: >
docker_image_multiline=("
ghcr.io/ansible-collections/community.mysql\
run: |-
echo "docker_image=ghcr.io/ansible-collections/community.mysql\
/test-container-${{ env.db_client }}\
-py${{ env.python_version_flat }}\
-${{ matrix.connector_name }}${{ env.connector_version_flat }}\
:latest")
echo "docker_image=$(printf '%s' $docker_image_multiline)"
>> $GITHUB_ENV
:latest" >> $GITHUB_ENV
- name: >-
Perform integration testing against
@ -332,7 +320,7 @@ jobs:
testing-type: integration
units:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
name: Units (Ⓐ${{ matrix.ansible }})
strategy:
# As soon as the first unit test fails,
@ -340,20 +328,20 @@ jobs:
fail-fast: true
matrix:
ansible:
- stable-2.14
- stable-2.15
- stable-2.16
- stable-2.17
- devel
python:
- 3.8
- 3.9
exclude:
- python: '3.8'
ansible: stable-2.14
- python: '3.8'
ansible: stable-2.15
- python: '3.8'
ansible: stable-2.16
- python: '3.8'
ansible: stable-2.17
- python: '3.8'
ansible: devel