master
1# https://hub.docker.com/r/library/ruby/tags/
2image: "ruby:2.3"
3
4# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-service
5services:
6 - redis:latest
7 - postgres:latest
8
9variables:
10 POSTGRES_DB: database_name
11 RAILS_ENV: test
12 DATABASE_URL: "postgresql://postgres:postgres@postgres:5432/$POSTGRES_DB"
13 REDIS_URL: "redis://redis:6379/12"
14
15cache:
16 paths:
17 - vendor/ruby
18
19before_script:
20 - ruby -v # Print out ruby version for debugging
21 - curl -sL https://deb.nodesource.com/setup_4.x | bash -
22 - apt-get update -q && apt-get install nodejs -yqq
23 - npm install npm -g
24 - npm install phantomjs-prebuilt -g
25 - gem install bundler --no-ri --no-rdoc # Bundler is not installed with the image
26 - bundle install -j $(nproc) --path vendor # Install dependencies into ./vendor/ruby
27 - bin/rake db:migrate db:seed
28
29rspec:
30 script:
31 - bin/rspec
32
33teaspoon:
34 script:
35 - bin/teaspoon
36
37cucumber:
38 script:
39 - bin/cucumber
40
41brakeman:
42 script:
43 - bundle exec brakeman