This commit is contained in:
Luc Didry
2017-06-12 21:23:53 +02:00
parent 75b645e6d4
commit 88b77f91fb
7 changed files with 72 additions and 25 deletions

View File

@@ -5,7 +5,36 @@ stages:
before_script:
- carton install
- rm -f *db
sqlite:
sqlite1:
stage: sqlite
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- MOJO_CONFIG=t/sqlite1.conf make test-sqlite
- MOJO_CONFIG=t/sqlite1.conf make watch
- MOJO_CONFIG=t/sqlite1.conf make cleanbdd
- MOJO_CONFIG=t/sqlite1.conf make cleanfiles
- MOJO_CONFIG=t/sqlite1.conf make stats
sqlite2:
stage: sqlite
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- MOJO_CONFIG=t/sqlite2.conf make minion &
- MOJO_CONFIG=t/sqlite2.conf make test-sqlite
- MOJO_CONFIG=t/sqlite2.conf make watch
- MOJO_CONFIG=t/sqlite2.conf make cleanbdd
- MOJO_CONFIG=t/sqlite2.conf make cleanfiles
- MOJO_CONFIG=t/sqlite2.conf make stats
sqlite3:
stage: sqlite
cache:
key: "$CI_BUILD_REF_NAME"
@@ -18,18 +47,8 @@ sqlite:
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/sqlite2.conf make minion &
- MOJO_CONFIG=t/sqlite3.conf make minion &
- MOJO_CONFIG=t/sqlite1.conf make test-sqlite
- MOJO_CONFIG=t/sqlite1.conf make watch
- MOJO_CONFIG=t/sqlite1.conf make cleanbdd
- MOJO_CONFIG=t/sqlite1.conf make cleanfiles
- MOJO_CONFIG=t/sqlite1.conf make stats
- MOJO_CONFIG=t/sqlite2.conf make test-sqlite
- MOJO_CONFIG=t/sqlite2.conf make watch
- MOJO_CONFIG=t/sqlite2.conf make cleanbdd
- MOJO_CONFIG=t/sqlite2.conf make cleanfiles
- MOJO_CONFIG=t/sqlite2.conf make stats
- sleep 3
- MOJO_CONFIG=t/sqlite3.conf make test-sqlite
- MOJO_CONFIG=t/sqlite3.conf make watch
- MOJO_CONFIG=t/sqlite3.conf make cleanbdd
@@ -38,7 +57,25 @@ sqlite:
tags:
- Debian
- Jessie
postgresql:
postgresql1:
stage: postgresql
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- service postgresql restart
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/postgresql1.conf make test-pg
- MOJO_CONFIG=t/postgresql1.conf make watch
- MOJO_CONFIG=t/postgresql1.conf make cleanbdd
- MOJO_CONFIG=t/postgresql1.conf make cleanfiles
- MOJO_CONFIG=t/postgresql1.conf make stats
postgresql2:
stage: postgresql
cache:
key: "$CI_BUILD_REF_NAME"
@@ -52,17 +89,27 @@ postgresql:
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/postgresql2.conf make minion &
- MOJO_CONFIG=t/postgresql3.conf make minion &
- MOJO_CONFIG=t/postgresql1.conf make test-pg
- MOJO_CONFIG=t/postgresql1.conf make watch
- MOJO_CONFIG=t/postgresql1.conf make cleanbdd
- MOJO_CONFIG=t/postgresql1.conf make cleanfiles
- MOJO_CONFIG=t/postgresql1.conf make stats
- sleep 3
- MOJO_CONFIG=t/postgresql2.conf make test-pg
- MOJO_CONFIG=t/postgresql2.conf make watch
- MOJO_CONFIG=t/postgresql2.conf make cleanbdd
- MOJO_CONFIG=t/postgresql2.conf make cleanfiles
- MOJO_CONFIG=t/postgresql2.conf make stats
postgresql3:
stage: postgresql
cache:
key: "$CI_BUILD_REF_NAME"
untracked: true
paths:
- local
script:
- make podcheck
- service postgresql restart
- sleep 10
- service postgresql status
- make create-pg-test-db
- MOJO_CONFIG=t/postgresql3.conf make minion &
- sleep 3
- MOJO_CONFIG=t/postgresql3.conf make test-pg
- MOJO_CONFIG=t/postgresql3.conf make watch
- MOJO_CONFIG=t/postgresql3.conf make cleanbdd

View File

@@ -80,7 +80,7 @@ sub startup {
# Minion
if ($config->{minion}->{enabled}) {
$self->config('minion')->{dbtype} = 'sqlite' unless defined $config->{minion}->{dbtype};
$self->config->{minion}->{dbtype} = 'sqlite' unless defined $config->{minion}->{dbtype};
if ($config->{minion}->{dbtype} eq 'sqlite') {
$self->config('minion')->{db_path} = 'minion.db' unless defined $config->{minion}->{db_path};
$self->plugin('Minion' => { SQLite => 'sqlite:'.$config->{minion}->{db_path} });

View File

@@ -118,7 +118,7 @@
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
#db_path => 'lutim.db',
db_path => 'testpg2.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database

View File

@@ -118,7 +118,7 @@
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
#db_path => 'lutim.db',
db_path => 'testpg3.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database

View File

@@ -118,7 +118,7 @@
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'test1.db',
db_path => 'testdqlite1.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database

View File

@@ -118,7 +118,7 @@
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'test2.db',
db_path => 'testsqlite2.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database

View File

@@ -118,7 +118,7 @@
# you can define it relative to lutim directory or set an absolute path
# remember that it has to be in a directory writable by Lutim user
# optional, default is lutim.db
db_path => 'test.db',
db_path => 'testsqlite3.db',
# PostgreSQL ONLY - only used if dbtype is set to postgresql
# these are the credentials to access the PostgreSQL database