Skip to content

Commit 5a91c79

Browse files
Fix mariadb test setup
1 parent b7a252a commit 5a91c79

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

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

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,6 @@ jobs:
4747
- mysql_5.7.31
4848
- mysql_8.0.22
4949
- mariadb_10.3.34
50-
# When adding later versions below,
51-
# also change the "Set MariaDB URL sub dir" task
5250
- mariadb_10.8.3
5351
ansible:
5452
- stable-2.12
@@ -99,14 +97,12 @@ jobs:
9997
DB_ENGINE_PRETTY=$([[ "${DB_ENGINE}" == 'mysql' ]] && echo 'MySQL' || echo 'MariaDB');
10098
>&2 echo Matrix factor for the DB is ${{ matrix.db_engine_version }}...;
10199
>&2 echo Setting ${DB_ENGINE_PRETTY} version to ${DB_VERSION}...;
102-
sed -i -e "s/^${DB_ENGINE}_version:.*/${DB_ENGINE}_version: $DB_VERSION/g" -e 's/^mariadb_install: false/mariadb_install: true/g' '${{ env.mysql_version_file }}';
103-
${{
104-
matrix.db_engine_version == 'mariadb_10.8.3'
105-
&& format(
106-
'>&2 echo Set MariaDB v10.8.3 URL sub dir...; sed -i -e "s/^mariadb_url_subdir:.*/mariadb_url_subdir: linux-systemd/g" "{0}";', env.connector_version_file
107-
)
108-
|| ''
109-
}}
100+
sed -i -e "s/^${DB_ENGINE}_version:.*/${DB_ENGINE}_version: $DB_VERSION/g" '${{ env.mysql_version_file }}';
101+
if [[ ${{ matrix.db_engine_version }} == mariadb* ]];
102+
then
103+
echo Set MariaDB install flag...; sed -i -e "s/^mariadb_install: false/mariadb_install: true/g" '${{ env.mysql_version_file }}';
104+
echo Set MariaDB v10.8.3 URL sub dir...; sed -i -e "s/^mariadb_url_subdir:.*/mariadb_url_subdir: linux-systemd/g" '${{ env.connector_version_file }}';
105+
fi;
110106
>&2 echo Setting Connector version to ${{ matrix.connector }}...;
111107
sed -i 's/^python_packages:.*/python_packages: [${{ matrix.connector }}]/' ${{ env.connector_version_file }}
112108
target-python-version: ${{ matrix.python }}

0 commit comments

Comments
 (0)