debian-mirror-gitlab/.gitlab-ci.yml

247 lines
4.9 KiB
YAML
Raw Normal View History

2016-02-05 20:25:01 +05:30
image: "ruby:2.1"
services:
- mysql:latest
- redis:latest
2016-04-02 18:10:28 +05:30
cache:
key: "ruby21"
paths:
- vendor
2016-02-05 20:25:01 +05:30
variables:
MYSQL_ALLOW_EMPTY_PASSWORD: "1"
2016-06-02 11:05:42 +05:30
# retry tests only in CI environment
RSPEC_RETRY_RETRY_COUNT: "3"
2016-02-05 20:25:01 +05:30
2015-09-11 14:41:01 +05:30
before_script:
2016-04-02 18:10:28 +05:30
- source ./scripts/prepare_build.sh
2015-09-11 14:41:01 +05:30
- ruby -v
- which ruby
2016-06-02 11:05:42 +05:30
- retry gem install bundler --no-ri --no-rdoc
2015-09-11 14:41:01 +05:30
- cp config/gitlab.yml.example config/gitlab.yml
- touch log/application.log
- touch log/test.log
2016-06-02 11:05:42 +05:30
- retry bundle install --without postgres production --jobs $(nproc) "${FLAGS[@]}"
2016-04-02 18:10:28 +05:30
- RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
2015-09-11 14:41:01 +05:30
2016-06-02 11:05:42 +05:30
stages:
- test
- notifications
2015-09-11 14:41:01 +05:30
spec:feature:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2015-09-11 14:41:01 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature
spec:api:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api
2015-12-23 02:04:40 +05:30
spec:models:
2016-06-02 11:05:42 +05:30
stage: test
2015-12-23 02:04:40 +05:30
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
spec:lib:
2016-06-02 11:05:42 +05:30
stage: test
2015-12-23 02:04:40 +05:30
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
spec:services:
2016-06-02 11:05:42 +05:30
stage: test
2015-12-23 02:04:40 +05:30
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
2015-10-24 18:46:33 +05:30
2015-09-11 14:41:01 +05:30
spec:other:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
2015-12-23 02:04:40 +05:30
spinach:project:half:
2016-06-02 11:05:42 +05:30
stage: test
2015-12-23 02:04:40 +05:30
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2015-12-23 02:04:40 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half
spinach:project:rest:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2015-12-23 02:04:40 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest
2015-09-11 14:41:01 +05:30
spinach:other:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2015-09-11 14:41:01 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other
teaspoon:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
- RAILS_ENV=test bundle exec teaspoon
rubocop:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
- bundle exec rubocop
2016-06-02 11:05:42 +05:30
scss-lint:
stage: test
script:
- bundle exec rake scss_lint
2015-09-11 14:41:01 +05:30
brakeman:
2016-06-02 11:05:42 +05:30
stage: test
2015-09-11 14:41:01 +05:30
script:
- bundle exec rake brakeman
2015-11-26 14:37:03 +05:30
flog:
2016-06-02 11:05:42 +05:30
stage: test
2015-11-26 14:37:03 +05:30
script:
- bundle exec rake flog
flay:
2016-06-02 11:05:42 +05:30
stage: test
2015-11-26 14:37:03 +05:30
script:
- bundle exec rake flay
2015-12-23 02:04:40 +05:30
bundler:audit:
2016-06-02 11:05:42 +05:30
stage: test
only:
- master
script:
- "bundle exec bundle-audit check --update --ignore OSVDB-115941"
db-migrate-reset:
stage: test
2016-04-02 18:10:28 +05:30
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake db:migrate:reset
2016-04-02 18:10:28 +05:30
# Ruby 2.2 jobs
spec:feature:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
2016-06-02 11:05:42 +05:30
- master
2016-04-02 18:10:28 +05:30
script:
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature
cache:
key: "ruby22"
paths:
- vendor
spec:api:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api
cache:
key: "ruby22"
paths:
- vendor
spec:models:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
cache:
key: "ruby22"
paths:
- vendor
spec:lib:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
cache:
key: "ruby22"
paths:
- vendor
spec:services:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
cache:
key: "ruby22"
paths:
- vendor
spec:other:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
cache:
key: "ruby22"
paths:
- vendor
spinach:project:half:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2016-04-02 18:10:28 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half
cache:
key: "ruby22"
paths:
- vendor
spinach:project:rest:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2016-04-02 18:10:28 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest
cache:
key: "ruby22"
paths:
- vendor
spinach:other:ruby22:
2016-06-02 11:05:42 +05:30
stage: test
2016-04-02 18:10:28 +05:30
image: ruby:2.2
only:
- master
script:
2016-06-02 11:05:42 +05:30
- RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
2016-04-02 18:10:28 +05:30
- RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other
cache:
key: "ruby22"
paths:
- vendor
2016-06-02 11:05:42 +05:30
notify:slack:
stage: notifications
script:
- ./scripts/notify_slack.sh "#builds" "Build on \`$CI_BUILD_REF_NAME\` failed! Commit \`$(git log -1 --oneline)\` See <https://gitlab.com/gitlab-org/$(basename "$PWD")/commit/"$CI_BUILD_REF"/builds>"
when: on_failure
only:
- master@gitlab-org/gitlab-ce
- tags@gitlab-org/gitlab-ce
- master@gitlab-org/gitlab-ee
- tags@gitlab-org/gitlab-ee