From b509e03dc1c85e6068a044e11e1dd3108061a611 Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 14 Aug 2018 17:42:51 +0200 Subject: [PATCH] Trying seperate stages --- .gitlab-ci.yml | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f9f43cb..2116e37 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,18 +1,16 @@ --- -test: - stage: test - variables: - POSTGRES_DB: debshots_test - POSTGRES_USER: debshots - POSTGRES_PASSWORD: "" - tags: +stages: + - build + - test + +tags: - stretch - services: - - postgres:latest +build: + stage: build - before_script: + script: - apt-get update -qy - apt-get install -y ruby ruby-dev imagemagick git build-essential zlib1g-dev libbz2-dev libpq-dev postgresql - gem install bundler --no-ri --no-rdoc @@ -20,6 +18,17 @@ test: - cp config/database.yml.gitlab config/database.yml - RAILS_ENV=test bundle exec rake db:create db:schema:load +test: + stage: test + + variables: + POSTGRES_DB: debshots_test + POSTGRES_USER: debshots + POSTGRES_PASSWORD: "" + + services: + - postgres:latest + script: - bundle exec rake test