-
Notifications
You must be signed in to change notification settings - Fork 6
/
.gitlab-ci.yml
41 lines (34 loc) · 815 Bytes
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
image: ruby:2.5.1
stages:
- rspec
- staging
cache:
paths:
- vendor/bundle
- node_modules
services:
- postgres:latest
variables:
BUNDLE_PATH: vendor/bundle
POSTGRES_DB: test_db
POSTGRES_USER: runner
POSTGRES_PASSWORD: ""
before_script:
- apt-get update -qq && apt-get install -y -qq postgresql postgresql-contrib libpq-dev cmake
- ruby -v
- which ruby
- gem install dpl
- gem install bundler --no-document
- RAILS_ENV=test bundle install --jobs $(nproc) "${FLAGS[@]}"
- cp config/database.yml.gitlab config/database.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
rspec:
stage: rspec
script:
- bundle exec rspec
staging:
stage: staging
only:
- master
script:
- dpl --provider=heroku --api-key=${HEROKU_API_KEY} --app=staging-alfred