debshots/.gitlab-ci.yml
Christoph Haas 9cd5198fe3 Tags fixed
2018-08-14 17:54:38 +02:00

45 lines
734 B
YAML

---
stages:
- build
- test
build:
stage: build
tags:
- ruby
- stretch
cache:
key: build-cache
paths:
- vendor/
- /var/cache/apt
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
- RAILS_ENV=test bundle install --path /cache
- cp config/database.yml.gitlab config/database.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
test:
stage: test
tags:
- ruby
- stretch
variables:
POSTGRES_DB: debshots_test
POSTGRES_USER: debshots
POSTGRES_PASSWORD: ""
services:
- postgres:latest
script:
- bundle exec rake test