mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-07-25 14:20:24 -07:00
Generalize mysql and mariadb version based on container name
This way we can split db_engine and db_version and simplify tests. Also this is mandatory to use the matrix.db_engine_version as the image name for our services containers.
This commit is contained in:
parent
90266f1ad5
commit
b821db97c5
13 changed files with 158 additions and 190 deletions
35
.github/workflows/ansible-test-plugins.yml
vendored
35
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -15,8 +15,7 @@ on:
|
|||
|
||||
|
||||
env:
|
||||
mysql_version_file: "tests/integration/targets/setup_mysql/defaults/main.yml"
|
||||
connector_version_file: "tests/integration/targets/setup_mysql/vars/main.yml"
|
||||
config_file: "tests/integration/targets/setup_mysql/defaults/main.yml"
|
||||
|
||||
jobs:
|
||||
# sanity:
|
||||
|
@ -44,13 +43,12 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# db_engine_version:
|
||||
# - mysql_5.7.31
|
||||
# - mysql_8.0.22
|
||||
# - mariadb_10.3.34
|
||||
# # When adding later versions below,
|
||||
# # also change the "Set MariaDB URL sub dir" task
|
||||
# - mariadb_10.8.3
|
||||
db_engine_version:
|
||||
# - mysql:5.7.40
|
||||
- mysql:8.0.22
|
||||
# - mariadb:10.4.24
|
||||
# - mariadb:10.5.18
|
||||
# - mariadb:10.8.3
|
||||
ansible:
|
||||
# - stable-2.12
|
||||
# - stable-2.13
|
||||
|
@ -88,10 +86,9 @@ jobs:
|
|||
|
||||
services:
|
||||
db_primary:
|
||||
# image: mariadb:10.5
|
||||
image: mysql:8.0.22
|
||||
image: ${{ matrix.db_engine_version }}
|
||||
env:
|
||||
# MARIADB_ROOT_PASSWORD: msandbox
|
||||
MARIADB_ROOT_PASSWORD: msandbox
|
||||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
ports:
|
||||
- 3307:3306
|
||||
|
@ -106,10 +103,9 @@ jobs:
|
|||
# --health-timeout 5s
|
||||
# --health-retries 6
|
||||
db_replica1:
|
||||
# image: mariadb:10.5
|
||||
image: mysql:8.0.22
|
||||
image: ${{ matrix.db_engine_version }}
|
||||
env:
|
||||
# MARIADB_ROOT_PASSWORD: msandbox
|
||||
MARIADB_ROOT_PASSWORD: msandbox
|
||||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
ports:
|
||||
- 3308:3306
|
||||
|
@ -122,10 +118,9 @@ jobs:
|
|||
# --health-timeout 5s
|
||||
# --health-retries 6
|
||||
db_replica2:
|
||||
# image: mariadb:10.5
|
||||
image: mysql:8.0.22
|
||||
image: ${{ matrix.db_engine_version }}
|
||||
env:
|
||||
# MARIADB_ROOT_PASSWORD: msandbox
|
||||
MARIADB_ROOT_PASSWORD: msandbox
|
||||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
ports:
|
||||
- 3309:3306
|
||||
|
@ -147,8 +142,10 @@ jobs:
|
|||
with:
|
||||
ansible-core-version: ${{ matrix.ansible }}
|
||||
pre-test-cmd: >-
|
||||
>&2 echo Setting db_engine_version to ${{ matrix.db_engine_version }}...;
|
||||
sed -i 's/^db_engine_version:.*/db_engine_version: [${{ matrix.db_engine_version }}]/' ${{ env.config_file }}
|
||||
>&2 echo Setting Connector version to ${{ matrix.connector }}...;
|
||||
sed -i 's/^python_packages:.*/python_packages: [${{ matrix.connector }}]/' ${{ env.connector_version_file }}
|
||||
sed -i 's/^python_packages:.*/python_packages: [${{ matrix.connector }}]/' ${{ env.config_file }}
|
||||
target-python-version: ${{ matrix.python }}
|
||||
testing-type: integration
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue