Skip to content
Snippets Groups Projects
Verified Commit 87f23724 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

ENH: CI for mysql: Makefile has new target `pipeline-test`

parent a750c0d3
No related branches found
No related tags found
2 merge requests!7Release v5.0.0,!4CI pipeline for mysql unit tests
Pipeline #9828 failed
This commit is part of merge request !4. Comments created here will be created in the context of that merge request.
......@@ -58,21 +58,19 @@ build-testenv:
######## Test ########
# Run the unit tests
unittests:
# Run the unit tests with MySQL
unittests-mysql:
tags: [ docker ]
stage: test
# script:
# - cp config.defaults .config
# - echo 'DATABASE_USER_HOST_LIST="%,"' >> .config
# - echo "MYSQL_USER_PASSWORD=$MYSQL_ROOT_PASSWORD" >> .config
# - echo "MYSQL_HOST=mysql" >> .config
# - sleep 10
# - make install
# - ./utils/make_db restore_db tests/example.dump.sql
# - ./tests/test_utils.sh
include: "/include-test.yml"
script:
- make pipeline-test SQL_HOST=mysql
# Run the unit tests with MariaDB
unittests-mariadb:
tags: [ docker ]
stage: test
script:
- make pipeline-test SQL_HOST=mariadb
######## Deploy ########
......
......@@ -24,6 +24,9 @@ SHELL=/bin/bash
INSTALL_SQL_FILE=db_2_0.sql
# The hostname, used by testing in the CI pipeline
SQL_HOST ?= mysql
.PHONY: test-connection
test-connection:
./utils/make_db test-connection
......@@ -74,3 +77,15 @@ test-docker-stop:
.PHONY: doc
doc:
$(MAKE) -C doc html
# Run tests in a Gitlab pipeline
.PHONY: pipeline-test
pipeline-test:
cp config.defaults .config
echo 'DATABASE_USER_HOST_LIST="%,"' >> .config
echo "MYSQL_USER_PASSWORD=$MYSQL_ROOT_PASSWORD" >> .config
echo "MYSQL_HOST=$(SQL_HOST)" >> .config
sleep 10
make install
./utils/make_db restore_db tests/example.dump.sql
./tests/test_utils.sh
script:
- cp config.defaults .config
- echo 'DATABASE_USER_HOST_LIST="%,"' >> .config
- echo "MYSQL_USER_PASSWORD=$MYSQL_ROOT_PASSWORD" >> .config
- echo "MYSQL_HOST=mysql" >> .config
- sleep 10
- make install
- ./utils/make_db restore_db tests/example.dump.sql
- ./tests/test_utils.sh
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment