Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-mysqlbackend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-mysqlbackend
Commits
87f23724
Verified
Commit
87f23724
authored
3 years ago
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
ENH: CI for mysql: Makefile has new target `pipeline-test`
parent
a750c0d3
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!7
Release v5.0.0
,
!4
CI pipeline for mysql unit tests
Pipeline
#9828
failed
3 years ago
Stage: setup
Stage: test
Stage: deploy
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+10
-12
10 additions, 12 deletions
.gitlab-ci.yml
Makefile
+15
-0
15 additions, 0 deletions
Makefile
include-test.yml
+0
-9
0 additions, 9 deletions
include-test.yml
with
25 additions
and
21 deletions
.gitlab-ci.yml
+
10
−
12
View file @
87f23724
...
@@ -58,21 +58,19 @@ build-testenv:
...
@@ -58,21 +58,19 @@ build-testenv:
######## Test ########
######## Test ########
# Run the unit tests
# Run the unit tests
with MySQL
unittests
:
unittests
-mysql
:
tags
:
[
docker
]
tags
:
[
docker
]
stage
:
test
stage
:
test
# script:
script
:
# - cp config.defaults .config
-
make pipeline-test SQL_HOST=mysql
# - 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"
# Run the unit tests with MariaDB
unittests-mariadb
:
tags
:
[
docker
]
stage
:
test
script
:
-
make pipeline-test SQL_HOST=mariadb
######## Deploy ########
######## Deploy ########
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
15
−
0
View file @
87f23724
...
@@ -24,6 +24,9 @@ SHELL=/bin/bash
...
@@ -24,6 +24,9 @@ SHELL=/bin/bash
INSTALL_SQL_FILE
=
db_2_0.sql
INSTALL_SQL_FILE
=
db_2_0.sql
# The hostname, used by testing in the CI pipeline
SQL_HOST
?=
mysql
.PHONY
:
test-connection
.PHONY
:
test-connection
test-connection
:
test-connection
:
./utils/make_db test-connection
./utils/make_db test-connection
...
@@ -74,3 +77,15 @@ test-docker-stop:
...
@@ -74,3 +77,15 @@ test-docker-stop:
.PHONY
:
doc
.PHONY
:
doc
doc
:
doc
:
$(
MAKE
)
-C
doc html
$(
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
This diff is collapsed.
Click to expand it.
include-test.yml
deleted
100644 → 0
+
0
−
9
View file @
a750c0d3
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment