2016-09-30 11:45:03 +00:00
|
|
|
image: "dev.gitlab.org:5005/gitlab/gitlab-build-images:ruby-2.3-git-2.7-phantomjs-2.1"
|
2016-01-22 13:45:34 +00:00
|
|
|
|
2016-02-07 00:57:04 +00:00
|
|
|
cache:
|
2016-08-12 12:41:27 +00:00
|
|
|
key: "ruby-231"
|
2016-02-07 00:57:04 +00:00
|
|
|
paths:
|
2016-06-12 21:05:19 +00:00
|
|
|
- vendor/ruby
|
2016-02-07 00:57:04 +00:00
|
|
|
|
2016-01-22 13:45:34 +00:00
|
|
|
variables:
|
|
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
|
2015-11-12 09:52:20 +00:00
|
|
|
# retry tests only in CI environment
|
|
|
|
RSPEC_RETRY_RETRY_COUNT: "3"
|
2016-05-22 01:41:17 +00:00
|
|
|
RAILS_ENV: "test"
|
|
|
|
SIMPLECOV: "true"
|
2016-09-22 10:51:06 +00:00
|
|
|
SETUP_DB: "true"
|
2016-06-03 21:03:58 +00:00
|
|
|
USE_BUNDLE_INSTALL: "true"
|
2016-06-17 08:59:48 +00:00
|
|
|
GIT_DEPTH: "20"
|
2016-08-09 18:25:11 +00:00
|
|
|
PHANTOMJS_VERSION: "2.1.1"
|
2016-01-22 13:45:34 +00:00
|
|
|
|
2015-06-04 14:54:32 +00:00
|
|
|
before_script:
|
2016-01-22 17:16:59 +00:00
|
|
|
- source ./scripts/prepare_build.sh
|
2015-06-03 20:05:33 +00:00
|
|
|
- cp config/gitlab.yml.example config/gitlab.yml
|
2016-05-22 05:31:38 +00:00
|
|
|
- bundle --version
|
2016-06-03 20:54:25 +00:00
|
|
|
- '[ "$USE_BUNDLE_INSTALL" != "true" ] || retry bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"'
|
2016-06-07 08:45:02 +00:00
|
|
|
- retry gem install knapsack
|
2016-10-05 23:05:16 +00:00
|
|
|
- '[ "$SETUP_DB" != "true" ] || bundle exec rake db:drop db:create db:schema:load db:migrate add_limits_mysql'
|
2016-02-24 21:53:13 +00:00
|
|
|
|
2016-05-22 01:17:15 +00:00
|
|
|
stages:
|
2016-06-03 15:15:00 +00:00
|
|
|
- prepare
|
2016-05-22 01:17:15 +00:00
|
|
|
- test
|
2016-06-03 15:35:00 +00:00
|
|
|
- post-test
|
2016-06-30 17:04:00 +00:00
|
|
|
- pages
|
2016-02-24 21:53:13 +00:00
|
|
|
|
2016-07-20 06:35:29 +00:00
|
|
|
.use-db: &use-db
|
2016-06-29 14:08:20 +00:00
|
|
|
services:
|
|
|
|
- mysql:latest
|
|
|
|
- redis:alpine
|
2016-07-20 06:35:29 +00:00
|
|
|
|
2016-06-23 10:35:04 +00:00
|
|
|
migration paths:
|
|
|
|
stage: test
|
|
|
|
<<: *use-db
|
2016-10-25 10:39:06 +00:00
|
|
|
variables:
|
|
|
|
SETUP_DB: "false"
|
2016-06-23 10:35:04 +00:00
|
|
|
script:
|
2016-11-21 21:57:06 +00:00
|
|
|
- git fetch origin v8.5.9
|
|
|
|
- git checkout -f FETCH_HEAD
|
2016-10-25 10:39:06 +00:00
|
|
|
- cp config/resque.yml.example config/resque.yml
|
|
|
|
- sed -i 's/localhost/redis/g' config/resque.yml
|
2016-11-21 21:51:38 +00:00
|
|
|
- bundle install --without postgres production --jobs $(nproc) ${FLAGS[@]} --retry=3
|
2016-06-23 10:35:04 +00:00
|
|
|
- rake db:drop db:create db:schema:load db:seed_fu
|
|
|
|
- git checkout $CI_BUILD_REF
|
2016-10-25 10:39:06 +00:00
|
|
|
- source scripts/prepare_build.sh
|
2016-06-23 10:35:04 +00:00
|
|
|
- rake db:migrate
|