diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 40 |
1 files changed, 36 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c23a7a3bf0e..dbdbae9d787 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,15 @@ -# This file is generated by GitLab CI +image: "ruby:2.2" + +services: + - mysql:latest + - postgres:latest + - redis:latest + +variables: + MYSQL_ALLOW_EMPTY_PASSWORD: "1" + before_script: - - ./scripts/prepare_build.sh + - source ./scripts/prepare_build.sh - ruby -v - which ruby - gem install bundler --no-ri --no-rdoc @@ -8,7 +17,7 @@ before_script: - touch log/application.log - touch log/test.log - bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}" - - bundle exec rake db:reset db:create RAILS_ENV=test + - RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate spec:feature: script: @@ -118,10 +127,33 @@ flay: - mysql bundler:audit: - script: + script: - "bundle exec bundle-audit update" - "bundle exec bundle-audit check" tags: - ruby - mysql allow_failure: true + +# Ruby 2.1 jobs + +spec:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec + tags: + - ruby + - mysql + only: + - master + +spinach:ruby21: + image: ruby:2.1 + script: + - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach + tags: + - ruby + - mysql + only: + - master |