mirror of
https://github.com/ansible-collections/community.mysql.git
synced 2025-04-07 03:00:34 -07:00
Draft: Cut necessity to specify docker image
This commit is contained in:
parent
22bba000d6
commit
5145b3868e
41 changed files with 504 additions and 476 deletions
386
.github/workflows/ansible-test-plugins.yml
vendored
386
.github/workflows/ansible-test-plugins.yml
vendored
|
@ -35,7 +35,7 @@ jobs:
|
|||
pull-request-change-detection: true
|
||||
|
||||
integration:
|
||||
name: "Integration (Python: ${{ matrix.python }}, Ansible: ${{ matrix.ansible }}, MySQL: ${{ matrix.db_engine_version }}, Connector: ${{ matrix.connector }})"
|
||||
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
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -54,317 +54,278 @@ jobs:
|
|||
# mysql-client 5.7 + Python 3.8
|
||||
# ==================================================================
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mysql:5.7.40
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 5.7.40
|
||||
python: '3.8'
|
||||
connector: pymysql==0.7.11
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my57-py38-pymysql0711:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.7.11
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mysql:5.7.40
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 5.7.40
|
||||
python: '3.8'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my57-py38-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mysql:5.7.40
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 5.7.40
|
||||
python: '3.8'
|
||||
connector: mysqlclient==2.0.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my57-py38-mysqlclient201:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.1
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# mysql-client 8 + Python 3.8
|
||||
# ==================================================================
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.8'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py38-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.8'
|
||||
connector: mysqlclient==2.0.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py38-mysqlclient201:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.1
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# mysql-client 8 + Python 3.9
|
||||
# ==================================================================
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.9'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py39-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.9'
|
||||
connector: mysqlclient==2.0.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py39-mysqlclient203:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.3
|
||||
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.9'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py39-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.9'
|
||||
connector: mysqlclient==2.0.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py39-mysqlclient203:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.3
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# mysql-client 8 + Python 3.10
|
||||
# ==================================================================
|
||||
# - ansible: stable-2.13
|
||||
# db_engine_version: mysql:8.0.31
|
||||
# db_engine_name: mysql
|
||||
# db_engine_version: 8.0.31
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-my80-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
|
||||
# - ansible: stable-2.14
|
||||
# db_engine_version: mysql:8.0.31
|
||||
# db_engine_name: mysql
|
||||
# db_engine_version: 8.0.31
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-my80-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
|
||||
# - ansible: devel
|
||||
# db_engine_version: mysql:8.0.31
|
||||
# db_engine_name: mysql
|
||||
# db_engine_version: 8.0.31
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-my80-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: devel
|
||||
db_engine_version: mysql:8.0.31
|
||||
db_engine_name: mysql
|
||||
db_engine_version: 8.0.31
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-my80-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
|
||||
# ==================================================================
|
||||
# mariadb-client 10.3 + Python 3.8
|
||||
# ==================================================================
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mariadb:10.4.27
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.4.27
|
||||
python: '3.8'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py38-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mariadb:10.4.27
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.4.27
|
||||
python: '3.8'
|
||||
connector: mysqlclient==2.0.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py38-mysqlclient201:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.1
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.8'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py38-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.12
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.8'
|
||||
connector: mysqlclient==2.0.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py38-mysqlclient201:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.1
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# mariadb-client 10.3 + Python 3.9
|
||||
# ==================================================================
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mariadb:10.4.27
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.4.27
|
||||
python: '3.9'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mariadb:10.4.27
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.4.27
|
||||
python: '3.9'
|
||||
connector: mysqlclient==2.0.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-mysqlclient203:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.3
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.9'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.9'
|
||||
connector: mysqlclient==2.0.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-mysqlclient203:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.3
|
||||
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mariadb:10.4.27
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.4.27
|
||||
python: '3.9'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mariadb:10.4.27
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.4.27
|
||||
python: '3.9'
|
||||
connector: mysqlclient==2.0.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-mysqlclient203:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.3
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.9'
|
||||
connector: pymysql==0.9.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-pymysql093:latest"
|
||||
connector_name: pymysql
|
||||
connector_version: 0.9.3
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.9'
|
||||
connector: mysqlclient==2.0.3
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb103-py39-mysqlclient203:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.0.3
|
||||
|
||||
|
||||
# ==================================================================
|
||||
# mariadb-client 10.6 + Python 3.10
|
||||
# ==================================================================
|
||||
# - ansible: stable-2.13
|
||||
# db_engine_version: mariadb:10.5.18
|
||||
# db_engine_name: mariadb
|
||||
# db_engine_version: 10.5.18
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-mariadb106-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb106-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
# - ansible: stable-2.13
|
||||
# db_engine_version: mariadb:10.6.11
|
||||
# db_engine_name: mariadb
|
||||
# db_engine_version: 10.6.11
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-mariadb106-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: stable-2.13
|
||||
db_engine_version: mariadb:10.6.11
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.6.11
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb106-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
|
||||
# - ansible: stable-2.14
|
||||
# db_engine_version: mariadb:10.5.18
|
||||
# db_engine_name: mariadb
|
||||
# db_engine_version: 10.5.18
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-mariadb106-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb106-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
# - ansible: stable-2.14
|
||||
# db_engine_version: mariadb:10.6.11
|
||||
# db_engine_name: mariadb
|
||||
# db_engine_version: 10.6.11
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-mariadb106-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: stable-2.14
|
||||
db_engine_version: mariadb:10.6.11
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.6.11
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb106-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
|
||||
# - ansible: devel
|
||||
# db_engine_version: mariadb:10.5.18
|
||||
# db_engine_name: mariadb
|
||||
# db_engine_version: 10.5.18
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-mariadb106-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: devel
|
||||
db_engine_version: mariadb:10.5.18
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.5.18
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb106-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
# - ansible: devel
|
||||
# db_engine_version: mariadb:10.6.11
|
||||
# db_engine_name: mariadb
|
||||
# db_engine_version: 10.6.11
|
||||
# python: '3.10'
|
||||
# connector: pymysql==1.0.2
|
||||
# docker_image:
|
||||
# "ghcr.io/ansible-collections/community.mysql\
|
||||
# /test-container-mariadb106-py310-pymysql102:latest"
|
||||
# connector_name: pymysql
|
||||
# connector_version: 1.0.2
|
||||
- ansible: devel
|
||||
db_engine_version: mariadb:10.6.11
|
||||
db_engine_name: mariadb
|
||||
db_engine_version: 10.6.11
|
||||
python: '3.10'
|
||||
connector: mysqlclient==2.1.1
|
||||
docker_image:
|
||||
"ghcr.io/ansible-collections/community.mysql\
|
||||
/test-container-mariadb106-py310-mysqlclient211:latest"
|
||||
connector_name: mysqlclient
|
||||
connector_version: 2.1.1
|
||||
|
||||
services:
|
||||
db_primary:
|
||||
image: docker.io/library/${{ matrix.db_engine_version }}
|
||||
image: docker.io/library/${{ matrix.db_engine_name }}:${{ matrix.db_engine_version }}
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: msandbox
|
||||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
|
@ -380,7 +341,7 @@ jobs:
|
|||
--health-retries 6
|
||||
|
||||
db_replica1:
|
||||
image: docker.io/library/${{ matrix.db_engine_version }}
|
||||
image: docker.io/library/${{ matrix.db_engine_name }}:${{ matrix.db_engine_version }}
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: msandbox
|
||||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
|
@ -394,7 +355,7 @@ jobs:
|
|||
--health-retries 6
|
||||
|
||||
db_replica2:
|
||||
image: docker.io/library/${{ matrix.db_engine_version }}
|
||||
image: docker.io/library/${{ matrix.db_engine_name }}:${{ matrix.db_engine_version }}
|
||||
env:
|
||||
MARIADB_ROOT_PASSWORD: msandbox
|
||||
MYSQL_ROOT_PASSWORD: msandbox
|
||||
|
@ -432,17 +393,34 @@ jobs:
|
|||
with:
|
||||
ansible-core-version: ${{ matrix.ansible }}
|
||||
pre-test-cmd: >-
|
||||
echo Setting db_engine_name to "${{ matrix.db_engine_name }}"...;
|
||||
echo -n "${{ matrix.db_engine_name }}" > tests/integration/db_engine_name;
|
||||
echo Setting db_engine_version to "${{ matrix.db_engine_version }}"...;
|
||||
echo -n "${{ matrix.db_engine_version }}" > tests/integration/db_engine_version;
|
||||
echo Setting Connector version to "${{ matrix.connector }}"...;
|
||||
echo -n "${{ matrix.connector }}" > tests/integration/connector;
|
||||
echo Setting Connector name to "${{ matrix.connector_name }}"...;
|
||||
echo -n "${{ matrix.connector_name }}" > tests/integration/connector_name;
|
||||
echo Setting Connector name to "${{ matrix.connector_version }}"...;
|
||||
echo -n "${{ matrix.connector_version }}" > tests/integration/connector_version;
|
||||
echo Setting Python version to "${{ matrix.python }}"...;
|
||||
echo -n "${{ matrix.python }}" > tests/integration/python;
|
||||
echo Setting Ansible version to "${{ matrix.ansible }}"...;
|
||||
echo -n "${{ matrix.ansible }}" > tests/integration/ansible
|
||||
docker-image: ${{ matrix.docker_image }}
|
||||
target-python-version: ${{ matrix.python }}
|
||||
testing-type: integration
|
||||
|
||||
TODO: Reproduce this part of the Makefile to select the dockerimage
|
||||
# db_ver_tuple := $(subst ., , $(db_engine_version))
|
||||
# db_engine_version_flat := $(word 1, $(db_ver_tuple))$(word 2, $(db_ver_tuple))
|
||||
|
||||
# con_ver_tuple := $(subst ., , $(connector_version))
|
||||
# connector_version_flat := $(word 1, $(con_ver_tuple))$(word 2, $(con_ver_tuple))$(word 3, $(con_ver_tuple))
|
||||
|
||||
# py_ver_tuple := $(subst ., , $(python))
|
||||
# python_version_flat := $(word 1, $(py_ver_tuple))$(word 2, $(py_ver_tuple))
|
||||
|
||||
# ifeq ($(db_engine_version_flat), 57)
|
||||
# db_client := my57
|
||||
# else
|
||||
# db_client := $(db_engine_name)
|
||||
# endif
|
||||
|
||||
units:
|
||||
runs-on: ubuntu-20.04
|
||||
|
|
19
.github/workflows/docker-image-mariadb-py310-mysqlclient211.yml
vendored
Normal file
19
.github/workflows/docker-image-mariadb-py310-mysqlclient211.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mariadb-py310-mysqlclient211
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb-py310-mysqlclient211/**'
|
||||
- '.github/workflows/docker-image-mariadb-py310-mysqlclient211.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb-py310-mysqlclient211
|
||||
context: test-containers/mariadb-py310-mysqlclient211
|
19
.github/workflows/docker-image-mariadb-py310-pymysql102.yml
vendored
Normal file
19
.github/workflows/docker-image-mariadb-py310-pymysql102.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mariadb-py310-pymysql102
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb-py310-pymysql102/**'
|
||||
- '.github/workflows/docker-image-mariadb-py310-pymysql102.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb-py310-pymysql102
|
||||
context: test-containers/mariadb-py310-pymysql102
|
19
.github/workflows/docker-image-mariadb-py38-mysqlclient201.yml
vendored
Normal file
19
.github/workflows/docker-image-mariadb-py38-mysqlclient201.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mariadb-py38-mysqlclient201
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-mariadb-py38-mysqlclient201.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb-py38-mysqlclient201
|
||||
context: test-containers/mariadb-py38-mysqlclient201
|
19
.github/workflows/docker-image-mariadb-py38-pymysql093.yml
vendored
Normal file
19
.github/workflows/docker-image-mariadb-py38-pymysql093.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mariadb-py38-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mariadb-py38-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb-py38-pymysql093
|
||||
context: test-containers/mariadb-py38-pymysql093
|
19
.github/workflows/docker-image-mariadb-py39-mysqlclient203.yml
vendored
Normal file
19
.github/workflows/docker-image-mariadb-py39-mysqlclient203.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mariadb-py39-mysqlclient203
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb-py39-mysqlclient203/**'
|
||||
- '.github/workflows/docker-image-mariadb-py39-mysqlclient203.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb-py39-mysqlclient203
|
||||
context: test-containers/mariadb-py39-mysqlclient203
|
19
.github/workflows/docker-image-mariadb-py39-pymysql093.yml
vendored
Normal file
19
.github/workflows/docker-image-mariadb-py39-pymysql093.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mariadb-py39-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb-py39-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mariadb-py39-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb-py39-pymysql093
|
||||
context: test-containers/mariadb-py39-pymysql093
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI mariadb103-py38-mysqlclient201
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb103-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py38-mysqlclient201
|
||||
context: test-containers/mariadb103-py38-mysqlclient201
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI mariadb103-py38-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb103-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py38-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py38-pymysql093
|
||||
context: test-containers/mariadb103-py38-pymysql093
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI mariadb103-py39-mysqlclient203
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb103-py39-mysqlclient203/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py39-mysqlclient203.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py39-mysqlclient203
|
||||
context: test-containers/mariadb103-py39-mysqlclient203
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI mariadb103-py39-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb103-py39-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mariadb103-py39-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb103-py39-pymysql093
|
||||
context: test-containers/mariadb103-py39-pymysql093
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI mariadb106-py310-mysqlclient211
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb106-py310-mysqlclient211/**'
|
||||
- '.github/workflows/docker-image-mariadb106-py310-mysqlclient211.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb106-py310-mysqlclient211
|
||||
context: test-containers/mariadb106-py310-mysqlclient211
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI mariadb106-py310-pymysql102
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mariadb106-py310-pymysql102/**'
|
||||
- '.github/workflows/docker-image-mariadb106-py310-pymysql102.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mariadb106-py310-pymysql102
|
||||
context: test-containers/mariadb106-py310-pymysql102
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI my80-py310-mysqlclient211
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/my80-py310-mysqlclient211/**'
|
||||
- '.github/workflows/docker-image-my80-py310-mysqlclient211.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py310-mysqlclient211
|
||||
context: test-containers/my80-py310-mysqlclient211
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI my80-py310-pymysql102
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/my80-py310-pymysql102/**'
|
||||
- '.github/workflows/docker-image-my80-py310-pymysql102.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py310-pymysql102
|
||||
context: test-containers/my80-py310-pymysql102
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI my80-py38-mysqlclient201
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/my80-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-my80-py38-mysqlclient201.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py38-mysqlclient201
|
||||
context: test-containers/my80-py38-mysqlclient201
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI my80-py38-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/my80-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-my80-py38-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py38-pymysql093
|
||||
context: test-containers/my80-py38-pymysql093
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI my80-py39-mysqlclient203
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/my80-py39-mysqlclient203/**'
|
||||
- '.github/workflows/docker-image-my80-py39-mysqlclient203.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py39-mysqlclient203
|
||||
context: test-containers/my80-py39-mysqlclient203
|
|
@ -1,19 +0,0 @@
|
|||
---
|
||||
name: Docker Image CI my80-py39-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/my80-py39-pymysql093/*'
|
||||
- '.github/workflows/docker-image-my80-py39-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-my80-py39-pymysql093
|
||||
context: test-containers/my80-py39-pymysql093
|
19
.github/workflows/docker-image-mysql-py310-mysqlclient211.yml
vendored
Normal file
19
.github/workflows/docker-image-mysql-py310-mysqlclient211.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mysql-py310-mysqlclient211
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mysql-py310-mysqlclient211/**'
|
||||
- '.github/workflows/docker-image-mysql-py310-mysqlclient211.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mysql-py310-mysqlclient211
|
||||
context: test-containers/mysql-py310-mysqlclient211
|
19
.github/workflows/docker-image-mysql-py310-pymysql102.yml
vendored
Normal file
19
.github/workflows/docker-image-mysql-py310-pymysql102.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mysql-py310-pymysql102
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mysql-py310-pymysql102/**'
|
||||
- '.github/workflows/docker-image-mysql-py310-pymysql102.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mysql-py310-pymysql102
|
||||
context: test-containers/mysql-py310-pymysql102
|
19
.github/workflows/docker-image-mysql-py38-mysqlclient201.yml
vendored
Normal file
19
.github/workflows/docker-image-mysql-py38-mysqlclient201.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mysql-py38-mysqlclient201
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mysql-py38-mysqlclient201/**'
|
||||
- '.github/workflows/docker-image-mysql-py38-mysqlclient201.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mysql-py38-mysqlclient201
|
||||
context: test-containers/mysql-py38-mysqlclient201
|
19
.github/workflows/docker-image-mysql-py38-pymysql093.yml
vendored
Normal file
19
.github/workflows/docker-image-mysql-py38-pymysql093.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mysql-py38-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mysql-py38-pymysql093/**'
|
||||
- '.github/workflows/docker-image-mysql-py38-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mysql-py38-pymysql093
|
||||
context: test-containers/mysql-py38-pymysql093
|
19
.github/workflows/docker-image-mysql-py39-mysqlclient203.yml
vendored
Normal file
19
.github/workflows/docker-image-mysql-py39-mysqlclient203.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mysql-py39-mysqlclient203
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mysql-py39-mysqlclient203/**'
|
||||
- '.github/workflows/docker-image-mysql-py39-mysqlclient203.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mysql-py39-mysqlclient203
|
||||
context: test-containers/mysql-py39-mysqlclient203
|
19
.github/workflows/docker-image-mysql-py39-pymysql093.yml
vendored
Normal file
19
.github/workflows/docker-image-mysql-py39-pymysql093.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
---
|
||||
name: Docker Image CI mysql-py39-pymysql093
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'test-containers/mysql-py39-pymysql093/*'
|
||||
- '.github/workflows/docker-image-mysql-py39-pymysql093.yml'
|
||||
- '.github/workflows/build-docker-image.yml'
|
||||
|
||||
jobs:
|
||||
|
||||
call-workflow-passing-data:
|
||||
uses: ./.github/workflows/build-docker-image.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
registry: ghcr.io
|
||||
image_name: test-container-mysql-py39-pymysql093
|
||||
context: test-containers/mysql-py39-pymysql093
|
42
Makefile
42
Makefile
|
@ -11,12 +11,32 @@ ifdef continue_on_errors
|
|||
_continue_on_errors = --retry-on-error --continue-on-error
|
||||
endif
|
||||
|
||||
|
||||
db_ver_tuple := $(subst ., , $(db_engine_version))
|
||||
db_engine_version_flat := $(word 1, $(db_ver_tuple))$(word 2, $(db_ver_tuple))
|
||||
|
||||
con_ver_tuple := $(subst ., , $(connector_version))
|
||||
connector_version_flat := $(word 1, $(con_ver_tuple))$(word 2, $(con_ver_tuple))$(word 3, $(con_ver_tuple))
|
||||
|
||||
py_ver_tuple := $(subst ., , $(python))
|
||||
python_version_flat := $(word 1, $(py_ver_tuple))$(word 2, $(py_ver_tuple))
|
||||
|
||||
ifeq ($(db_engine_version_flat), 57)
|
||||
db_client := my57
|
||||
else
|
||||
db_client := $(db_engine_name)
|
||||
endif
|
||||
|
||||
|
||||
.PHONY: test-integration
|
||||
test-integration:
|
||||
echo -n $(db_engine_version) > tests/integration/db_engine_version
|
||||
echo -n $(connector) > tests/integration/connector
|
||||
echo -n $(python) > tests/integration/python
|
||||
echo -n $(ansible) > tests/integration/ansible
|
||||
@echo -n $(db_engine_name) > tests/integration/db_engine_name
|
||||
@echo -n $(db_engine_version) > tests/integration/db_engine_version
|
||||
@echo -n $(connector_name) > tests/integration/connector_name
|
||||
@echo -n $(connector_version) > tests/integration/connector_version
|
||||
@echo -n $(python) > tests/integration/python
|
||||
@echo -n $(ansible) > tests/integration/ansible
|
||||
|
||||
# Create podman network for systems missing it. Error can be ignored
|
||||
podman network create podman || true
|
||||
podman run \
|
||||
|
@ -28,7 +48,7 @@ test-integration:
|
|||
--network podman \
|
||||
--publish 3307:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
docker.io/library/$(db_engine_version) \
|
||||
docker.io/library/$(db_engine_name):$(db_engine_version) \
|
||||
mysqld
|
||||
podman run \
|
||||
--detach \
|
||||
|
@ -39,7 +59,7 @@ test-integration:
|
|||
--network podman \
|
||||
--publish 3308:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
docker.io/library/$(db_engine_version) \
|
||||
docker.io/library/$(db_engine_name):$(db_engine_version) \
|
||||
mysqld
|
||||
podman run \
|
||||
--detach \
|
||||
|
@ -50,7 +70,7 @@ test-integration:
|
|||
--network podman \
|
||||
--publish 3309:3306 \
|
||||
--health-cmd 'mysqladmin ping -P 3306 -pmsandbox | grep alive || exit 1' \
|
||||
docker.io/library/$(db_engine_version) \
|
||||
docker.io/library/$(db_engine_name):$(db_engine_version) \
|
||||
mysqld
|
||||
# Setup replication and restart containers
|
||||
podman exec primary bash -c 'echo -e [mysqld]\\nserver-id=1\\nlog-bin=/var/lib/mysql/primary-bin > /etc/mysql/conf.d/replication.cnf'
|
||||
|
@ -69,9 +89,13 @@ test-integration:
|
|||
source .venv/$(ansible)/bin/activate
|
||||
python$(local_python_version) -m ensurepip
|
||||
python$(local_python_version) -m pip install --disable-pip-version-check https://github.com/ansible/ansible/archive/$(ansible).tar.gz
|
||||
-set -x; ansible-test integration $(target) -v --color --coverage --diff --docker $(docker_image) --docker-network podman $(_continue_on_errors) $(_keep_containers_alive) --python $(python); set +x
|
||||
-set -x; ansible-test integration $(target) -v --color --coverage --diff \
|
||||
--docker ghcr.io/ansible-collections/community.mysql/test-container-$(db_client)-py$(python_version_flat)-$(connector_name)$(connector_version_flat):latest \
|
||||
--docker-network podman $(_continue_on_errors) $(_keep_containers_alive) --python $(python); set +x
|
||||
rm tests/integration/db_engine_name
|
||||
rm tests/integration/db_engine_version
|
||||
rm tests/integration/connector
|
||||
rm tests/integration/connector_name
|
||||
rm tests/integration/connector_version
|
||||
rm tests/integration/python
|
||||
rm tests/integration/ansible
|
||||
ifndef keep_containers_alive
|
||||
|
|
61
TESTING.md
61
TESTING.md
|
@ -21,18 +21,17 @@ For now, the makefile only supports Podman.
|
|||
|
||||
- python >= 3.8 and <= 3.10
|
||||
- make
|
||||
- podman
|
||||
- Minimum 15GB of free space on the device storing containers images and volumes. You can use this command to check: `podman system info --format='{{.Store.GraphRoot}}'|xargs findmnt --noheadings --nofsroot --output SOURCE --target|xargs df -h --output=size,used,avail,pcent,target`
|
||||
- Minimum 2GB of RAM
|
||||
|
||||
|
||||
### Custom ansible-test containers
|
||||
|
||||
Our integrations tests use custom containers for ansible-test. Those images definition file are in [https://github.com/community.mysql/test-containers](https://github.com/ansible-collections/community.mysql/tree/main/test-containers) and then pushed to ghcr.io under the ansible-collection namespace: E.G.:
|
||||
Our integrations tests use custom containers for ansible-test. Those images have their definition file stored in the directory [test-containers](test-containers/). We build and publish the images on ghcr.io under the ansible-collection namespace: E.G.:
|
||||
`ghcr.io/ansible-collections/community.mysql/test-container-mariadb106-py310-mysqlclient211:latest`.
|
||||
|
||||
Look in the link above for a complete list of available containers.
|
||||
|
||||
You can also look into `[.github/workflows/ansible-test-plugins.yml](https://github.com/ansible-collections/community.mysql/tree/main/.github/workflows)` to see how those containers are built.
|
||||
Availables images are listed [here](https://github.com/orgs/ansible-collections/packages).
|
||||
|
||||
|
||||
### Makefile options
|
||||
|
@ -45,7 +44,7 @@ The Makefile accept the following options
|
|||
- "3.8"
|
||||
- "3.9"
|
||||
- "3.10"
|
||||
- Description: This option can be omitted if your system has a version supported by Ansible. You can check with `python -V` and `ls /bin/python*`.
|
||||
- Description: If `Python -V` shows an unsupported version, use this option and choose one of the version available on your system. Use `ls /usr/bin/python3*|grep -v config` to list them.
|
||||
|
||||
- `ansible`
|
||||
- Mandatory: true
|
||||
|
@ -76,26 +75,40 @@ The Makefile accept the following options
|
|||
- "ghcr.io/ansible-collections/community.mysql/test-container-mariadb106-py310-pymysql102:latest"
|
||||
- Description: The container image ansible-test will use. You must provide the right container_image that matches the specified `db_engine_version`, `python`, etc...
|
||||
|
||||
- `db_engine`
|
||||
- Mandatory: true
|
||||
- Choices:
|
||||
- "mysql"
|
||||
- "mariadb"
|
||||
- Description: The name of the database engine to use for the service containers that will host a primary database and two replicas.
|
||||
|
||||
- `db_engine_version`
|
||||
- Mandatory: true
|
||||
- Choices:
|
||||
- "mysql:5.7.40"
|
||||
- "mysql:8.0.31"
|
||||
- "mariadb:10.4.24"
|
||||
- "mariadb:10.5.18"
|
||||
- "mariadb:10.6.11"
|
||||
- Description: The name of the container to use for the service containers that will host a primary database and two replicas. Either MYSQL or MariaDB. Use ':' as a separator. Do not use short version, like `mysql:8` (don't do that) because our tests expect a full version to filter tests precisely. For instance: `when: db_version is version ('8.0.22', '>')`. You can use any tag available on [hub.docker.com/_/mysql](https://hub.docker.com/_/mysql) and [hub.docker.com/_/mariadb](https://hub.docker.com/_/mariadb) but GitHub Action will only use the versions listed above.
|
||||
- "5.7.40" <- mysql
|
||||
- "8.0.31" <- mysql
|
||||
- "10.4.24" <- mariadb
|
||||
- "10.5.18" <- mariadb
|
||||
- "10.6.11" <- mariadb
|
||||
- Description: The tag of the container to use for the service containers that will host a primary database and two replicas. Do not use short version, like `mysql:8` (don't do that) because our tests expect a full version to filter tests precisely. For instance: `when: db_version is version ('8.0.22', '>')`. You can use any tag available on [hub.docker.com/_/mysql](https://hub.docker.com/_/mysql) and [hub.docker.com/_/mariadb](https://hub.docker.com/_/mariadb) but GitHub Action will only use the versions listed above.
|
||||
|
||||
- `connector`
|
||||
- `connector_name`
|
||||
- Mandatory: true
|
||||
- Choices:
|
||||
- "pymysql==0.7.11" <- Only for MySQL 5.7
|
||||
- "pymysql==0.9.3"
|
||||
- "pymysql==1.0.2" <- Not working, need fix
|
||||
- "mysqlclient==2.0.1"
|
||||
- "mysqlclient==2.0.3"
|
||||
- "mysqlclient==2.1.1"
|
||||
- Description: The name of the python package of the connector along with its version number. Use '==' as a separator.
|
||||
- "pymysql
|
||||
- "mysqlclient"
|
||||
- Description: The python package of the connector to use. This value is used to filter tests meant for other connectors.
|
||||
|
||||
- `connector_version`
|
||||
- Mandatory: true
|
||||
- Choices:
|
||||
- "0.7.11" <- Only for MySQL 5.7
|
||||
- "0.9.3"
|
||||
- "1.0.2" <- Not working, need fix
|
||||
- "2.0.1"
|
||||
- "2.0.3"
|
||||
- "2.1.1"
|
||||
- Description: The version of the python package of the connector to use. This value is used to filter tests meant for other connectors.
|
||||
|
||||
- `python`
|
||||
- Mandatory: true
|
||||
|
@ -131,17 +144,17 @@ test will recreate those containers so no need to kill it. Add any value to acti
|
|||
|
||||
```sh
|
||||
# Run all targets
|
||||
make ansible="stable-2.12" db_engine_version="mysql:5.7.40" python="3.8" connector="pymysql==0.7.11" docker_image="ghcr.io/ansible-collections/community.mysql/test-container-my57-py38-pymysql0711:latest"
|
||||
make ansible="stable-2.12" db_engine_name="mysql" db_engine_version="5.7.40" python="3.8" connector_name="pymysql" connector_version="0.7.11"
|
||||
|
||||
# A single target
|
||||
make ansible="stable-2.14" db_engine_version="mysql:5.7.40" python="3.8" connector="pymysql==0.7.11" docker_image="ghcr.io/ansible-collections/community.mysql/test-container-my57-py38-pymysql0711:latest" target="test_mysql_db"
|
||||
make ansible="stable-2.14" db_engine_name="mysql" db_engine_version="5.7.40" python="3.8" connector_name="pymysql" connector_version="0.7.11"
|
||||
|
||||
# Keep databases and ansible tests containers alives
|
||||
# A single target and continue on errors
|
||||
make ansible="stable-2.14" db_engine_version="mysql:8.0.31" python="3.9" connector="mysqlclient==2.0.3" docker_image="ghcr.io/ansible-collections/community.mysql/test-container-my80-py39-mysqlclient203:latest" target="test_mysql_db" keep_containers_alive=1 continue_on_errors=1
|
||||
make ansible="stable-2.14" db_engine_name="mysql" db_engine_version="8.0.31" python="3.9" connector_name="mysqlclient" connector_version="2.0.3"
|
||||
|
||||
# If your system has an usupported version of Python:
|
||||
make local_python_version="3.8" ansible="stable-2.14" db_engine_version="mariadb:10.6.11" python="3.9" connector="pymysql==0.9.3" docker_image="ghcr.io/ansible-collections/community.mysql/test-container-mariadb103-py39-pymysql093:latest"
|
||||
make local_python_version="3.8" ansible="stable-2.14" db_engine_name="mariadb" db_engine_version="10.6.11" python="3.9" connector_name="pymysql" connector_version="0.9.3"
|
||||
```
|
||||
|
||||
|
||||
|
@ -158,6 +171,8 @@ python run_all_tests.py
|
|||
|
||||
### Add a new Python, Connector or Database version
|
||||
|
||||
You can look into `[.github/workflows/ansible-test-plugins.yml](https://github.com/ansible-collections/community.mysql/tree/main/.github/workflows)` to see how those containers are built using [build-docker-image.yml](https://github.com/ansible-collections/community.mysql/blob/main/.github/workflows/build-docker-image.yml) and all [docker-image-xxx.yml](https://github.com/ansible-collections/community.mysql/blob/main/.github/workflows/docker-image-mariadb103-py38-mysqlclient201.yml) files.
|
||||
|
||||
1. Add a workflow in [.github/workflows/](.github/workflows)
|
||||
1. Add a new folder in [test-containers](test-containers) containing a new Dockerfile. Your container must contains 3 things:
|
||||
- Python
|
||||
|
|
|
@ -70,12 +70,13 @@ def main():
|
|||
|
||||
for tests in tests_matrix_yaml.get('include'):
|
||||
a = tests.get('ansible')
|
||||
d = tests.get('db_engine_version')
|
||||
dn = tests.get('db_engine_name')
|
||||
dv = tests.get('db_engine_version')
|
||||
p = tests.get('python')
|
||||
c = tests.get('connector')
|
||||
i = tests.get('docker_image')
|
||||
make_cmd = f'make ansible="{a}" db_engine_version="{d}" python="{p}" connector="{c}" docker_image="{i}" test-integration'
|
||||
print(f'Run tests for: Ansible: {a}, DB: {d}, Python: {p}, Connector: {c}, Docker image: {i}')
|
||||
cn = tests.get('connector_name')
|
||||
cv = tests.get('connector_version')
|
||||
make_cmd = f'make ansible="{a}" db_engine_name="{dn}" db_engine_version="{dv}" python="{p}" connector_name="{cn}" connector_version="{cv}" test-integration'
|
||||
print(f'Run tests for: Ansible: {a}, DB: {dn} {dv}, Python: {p}, Connector: {cn} {cv}')
|
||||
os.system(make_cmd)
|
||||
# TODO, allow for CTRL+C to break the loop more easily
|
||||
# TODO, store the failures from this iteration
|
||||
|
|
|
@ -8,12 +8,22 @@
|
|||
- name: "{{ role_name }} | Setvars | Set Fact"
|
||||
ansible.builtin.set_fact:
|
||||
gateway_addr: "{{ ip_route_output.stdout }}"
|
||||
connector_name_version: >-
|
||||
connector_name_lookup: >-
|
||||
{{ lookup(
|
||||
'file',
|
||||
'/root/ansible_collections/community/mysql/tests/integration/connector'
|
||||
'/root/ansible_collections/community/mysql/tests/integration/connector_name'
|
||||
) }}
|
||||
db_engine_version: >-
|
||||
connector_version_lookup: >-
|
||||
{{ lookup(
|
||||
'file',
|
||||
'/root/ansible_collections/community/mysql/tests/integration/connector_version'
|
||||
) }}
|
||||
db_engine_name_lookup: >-
|
||||
{{ lookup(
|
||||
'file',
|
||||
'/root/ansible_collections/community/mysql/tests/integration/db_engine_name'
|
||||
) }}
|
||||
db_engine_version_lookup: >-
|
||||
{{ lookup(
|
||||
'file',
|
||||
'/root/ansible_collections/community/mysql/tests/integration/db_engine_version'
|
||||
|
@ -31,10 +41,10 @@
|
|||
|
||||
- name: "{{ role_name }} | Setvars | Set Fact using above facts"
|
||||
ansible.builtin.set_fact:
|
||||
connector_name: "{{ connector_name_version.split('=')[0].strip() }}"
|
||||
connector_version: "{{ connector_name_version.split('=')[2].strip() }}"
|
||||
db_engine: "{{ db_engine_version.split(':')[0].strip() }}"
|
||||
db_version: "{{ db_engine_version.split(':')[1].strip() }}"
|
||||
connector_name: "{{ connector_name_lookup.strip() }}"
|
||||
connector_version: "{{ connector_version_lookup.strip() }}"
|
||||
db_engine: "{{ db_engine_name_lookup.strip() }}"
|
||||
db_version: "{{ db_engine_version_lookup.strip() }}"
|
||||
python_version: "{{ python_version_lookup.strip() }}"
|
||||
test_ansible_version: >-
|
||||
{%- if ansible_version_lookup == 'devel' -%}
|
||||
|
|
Loading…
Add table
Reference in a new issue