aboutsummaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2017-03-20 22:20:39 +0000
committerPatrick J Cherry <patrick@bytemark.co.uk>2017-03-20 22:20:39 +0000
commit9497809c98ba16d93d5291b6753e9cc3fb562684 (patch)
treea9efac6b9581f01b734d5e1cfce5d652ae6fb5df /.gitlab-ci.yml
parente56dc80cbf0bb21e7232173bed465800a1a59e79 (diff)
Added postgres service + tests for jessie
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml12
1 files changed, 9 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cc9f55e..1215d24 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -6,6 +6,12 @@ stages:
test:jessie: &test
image: $CI_REGISTRY/docker-images/layers:$DISTRO-ruby
stage: test
+ services:
+ - postgres:latest
+ variables:
+ POSTGRES_DB: mauve
+ POSTGRES_USER: mauveuser
+ POSTGRES_PASSWORD: ""
variables:
DISTRO: jessie
before_script:
@@ -13,9 +19,9 @@ test:jessie: &test
script:
- apt install libsqlite3-dev rake ruby-log4r ruby-ipaddress ruby-json ruby-sanitize ruby-rubymail thin ruby-haml ruby-haml-contrib ruby-redcloth ruby-rack ruby-rack-protection ruby-rack-flash3 ruby-tilt ruby-sinatra ruby-locale ruby-rack-test ruby-webmock ruby-timecop ruby-test-unit
- bundle install -j $(nproc) --path vendor/bundle --without development
- - bundle exec rake test
+ - POSTGRES_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@postgres/$POSTGRES_DB bundle exec rake test
-test:stretch:
+.test:stretch:
<<: *test
variables:
DISTRO: stretch
@@ -33,7 +39,7 @@ package:jessie: &package
paths:
- pkg/
-package:stretch:
+.package:stretch:
<<: *package
variables:
DISTRO: stretch