diff options
author | Harald Eilertsen <haraldei@anduin.net> | 2023-12-28 17:50:51 +0100 |
---|---|---|
committer | Harald Eilertsen <haraldei@anduin.net> | 2023-12-28 17:50:51 +0100 |
commit | 3f09af98cf425d955af58817949b566aefbd4526 (patch) | |
tree | 6b6184e1c02ad6d4fd8366f09b9f2061d8544cb0 /.gitlab-ci.yml | |
parent | fb4adf6a29a3a536a4b5dfef989e3ae7c7304f4f (diff) | |
download | volse-hubzilla-3f09af98cf425d955af58817949b566aefbd4526.tar.gz volse-hubzilla-3f09af98cf425d955af58817949b566aefbd4526.tar.bz2 volse-hubzilla-3f09af98cf425d955af58817949b566aefbd4526.zip |
ci: Enable db testing in CI.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1354a5de7..2039071c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,4 @@ # Select image from https://hub.docker.com/_/php/ -#image: php:7.3 -# Use a prepared Hubzilla image to optimise pipeline duration -# image: registry.gitlab.com/dawnbreak/hubzilla/core:php7.3 - image: php:8.1 stages: @@ -57,13 +53,13 @@ before_script: # hidden job definition with template for MySQL/MariaDB -#.job_template_mysql: &job_definition_mysql -# stage: test -# script: -# - echo "USE $MYSQL_DATABASE; $(cat ./install/schema_mysql.sql)" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_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" -# - vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-text +.job_template_mysql: &job_definition_mysql + stage: test + script: + - echo "USE $MYSQL_DATABASE; $(cat ./install/schema_mysql.sql)" | mysql --user=root --password="$MYSQL_ROOT_PASSWORD" --host=mysql "$MYSQL_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" + - vendor/bin/phpunit --configuration tests/phpunit-ci-mysql.xml --coverage-text # hidden job definition with template for PostgreSQL #.job_template_postgres: &job_definition_postgres @@ -96,14 +92,14 @@ before_script: # PHP8.1 -php8.1: - <<: *job_definition_php +# php8.1: +# <<: *job_definition_php # PHP8.0 with MySQL 5.7 -#php8.0_mysql5.7: -# <<: *job_definition_mysql -# services: -# - mysql:5.7 +php8.1_mysql5.7: + <<: *job_definition_mysql + services: + - mysql:5.7 # PHP8.0 with MySQL 8 (latest) |