Next try with CI

This commit is contained in:
Christoph Haas 2018-08-14 16:37:06 +02:00
parent 71ce68fdcd
commit 4d66ebde15
2 changed files with 24 additions and 5 deletions

View file

@ -1,13 +1,24 @@
--- ---
test: test:
stage: test stage: test
vars:
POSTGRES_DB: test_db
POSTGRES_USER: runner
POSTGRES_PASSWORD: ""
tags: tags:
- stretch - stretch
script:
services:
- postgres:latest
before_script:
- apt-get update -qy - apt-get update -qy
- apt-get install -y ruby ruby-dev imagemagick git build-essential zlib1g-dev libbz2-dev libpq-dev - apt-get install -y ruby ruby-dev imagemagick git build-essential zlib1g-dev libbz2-dev libpq-dev postgresql
- gem install bundler - gem install bundler --no-ri --no-rdoc
- bundle install --path /cache - RAILS_ENV=test bundle install --path /cache
- bundle exec rake db:create RAILS_ENV=test - cp config/database.yml.gitlab config/database.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
railstest:
- bundle exec rake test - bundle exec rake test

View file

@ -0,0 +1,8 @@
test:
adapter: postgresql
database: debshots_test
username: debshots
password: ''
host: localhost
pool: 5
timeout: 5000