aboutsummaryrefslogtreecommitdiffstats
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-01-21 23:01:50 +0100
committerHarald Eilertsen <haraldei@anduin.net>2024-01-22 12:44:36 +0100
commitacdb773f894c3d15e02d0f829f1133f79c5c3229 (patch)
tree1daee17701c4fdb27696006a5a5906e8be83fe31 /.gitlab-ci.yml
parentf573c1772a83ffe7307c5b644fbdef9218c105b0 (diff)
downloadvolse-hubzilla-acdb773f894c3d15e02d0f829f1133f79c5c3229.tar.gz
volse-hubzilla-acdb773f894c3d15e02d0f829f1133f79c5c3229.tar.bz2
volse-hubzilla-acdb773f894c3d15e02d0f829f1133f79c5c3229.zip
CI: Add job for MariaDB 10.6
Reuse job definition for mysql job, and alias the mariadb service to mysql so that the job will find it.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml17
1 files changed, 13 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 960077c3a..76dc41334 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,7 @@ variables:
# Ignore a Composer warning
COMPOSER_ALLOW_SUPERUSER: 1
# Configure MySQL/MariaDB service (https://hub.docker.com/_/mysql/, https://hub.docker.com/_/mariadb/)
+ DB_HOST: mysql
MYSQL_DATABASE: hello_world_test
MYSQL_ROOT_PASSWORD: mysql
# Configure PostgreSQL service (https://hub.docker.com/_/postgres/)
@@ -44,17 +45,17 @@ before_script:
.job_template_mysql: &job_definition_mysql
stage: test
variables:
- HZ_TEST_DB_HOST: mysql
+ HZ_TEST_DB_HOST: $DB_HOST
HZ_TEST_DB_TYPE: mysql
HZ_TEST_DB_USER: root
HZ_TEST_DB_PASS: $MYSQL_ROOT_PASSWORD
HZ_TEST_DB_DATABASE: $MYSQL_DATABASE
script:
# Import hubzilla's DB schema
- - echo "USE $MYSQL_DATABASE; $(cat ./install/schema_mysql.sql)" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE"
+ - echo "USE $MYSQL_DATABASE; $(cat ./install/schema_mysql.sql)" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host="$DB_HOST" "$MYSQL_DATABASE"
# Show databases and relations/tables of hubzilla's database
- - echo "SHOW DATABASES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE"
- - echo "USE $MYSQL_DATABASE; SHOW TABLES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_DATABASE"
+ - echo "SHOW DATABASES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host="$DB_HOST" "$MYSQL_DATABASE"
+ - echo "USE $MYSQL_DATABASE; SHOW TABLES;" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host="$DB_HOST" "$MYSQL_DATABASE"
# Run the actual tests
- touch dbfail.out
- vendor/bin/phpunit --configuration tests/phpunit.xml --verbose --stop-on-error --coverage-text --colors=never --log-junit tests/results/junit.xml || exit_code=$?
@@ -107,6 +108,14 @@ php8.1_mysql8.0.22:
<<: *job_definition_mysql
<<: *artifacts_template
+# PHP8.1 with MariaDB 10.6
+php8.1_mariadb10.6:
+ image: php:8.1
+ services:
+ - name: mariadb:10.6
+ alias: mysql
+ <<: *job_definition_mysql
+ <<: *artifacts_template
# PHP8.1 with PostgreSQL 12
php8.1_postgres12: