From ceaf3a089b436da42b1fde0d2aa79fe149551091 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 14 Aug 2018 18:36:12 +0200 Subject: [PATCH] Merging steps --- .gitlab-ci.yml | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6e5b7ed..387e60e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,19 @@ --- -stages: - - build - - test - build: - stage: build tags: - ruby - stretch + variables: + POSTGRES_DB: debshots_test + POSTGRES_USER: debshots + POSTGRES_PASSWORD: "" + + services: + - postgres:latest + cache: key: build-cache paths: @@ -21,28 +24,6 @@ build: - apt-get -o dir::cache::archives="vendor/apt" install -yqq imagemagick git build-essential zlib1g-dev libbz2-dev libpq-dev postgresql #- gem install bundler --no-ri --no-rdoc - RAILS_ENV=test bundle install --path vendor - -test: - stage: test - - tags: - - ruby - - stretch - - cache: - key: build-cache - paths: - - vendor/ - - variables: - POSTGRES_DB: debshots_test - POSTGRES_USER: debshots - POSTGRES_PASSWORD: "" - - services: - - postgres:latest - - script: - cp config/database.yml.gitlab config/database.yml - RAILS_ENV=test bundle exec rake db:create db:schema:load - bundle exec rake test