Skip to content
Snippets Groups Projects
.gitlab-ci.yml 4.07 KiB
Newer Older
  • Learn to ignore specific revisions
  • 
    services:
      - mysql:latest
      - postgres:latest
      - redis:latest
    
    variables:
      MYSQL_ALLOW_EMPTY_PASSWORD: "1"
    
    
    Dmitriy Zaporozhets's avatar
    Dmitriy Zaporozhets committed
    before_script:
    
      - source ./scripts/prepare_build.sh
    
    Valery Sizov's avatar
    Valery Sizov committed
      - ruby -v
      - which ruby
    
      - gem install bundler --no-ri --no-rdoc
    
    Valery Sizov's avatar
    Valery Sizov committed
      - cp config/gitlab.yml.example config/gitlab.yml
      - touch log/application.log
      - touch log/test.log
    
      - bundle install --without postgres production --jobs $(nproc)  "${FLAGS[@]}"
    
      - RAILS_ENV=test bundle exec rake db:drop db:create db:schema:load db:migrate
    
        - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
    
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature
      tags:
        - ruby
        - mysql
    
    spec:api:
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api
      tags:
        - ruby
        - mysql
    
    
    Douwe Maan's avatar
    Douwe Maan committed
    spec:models:
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
      tags:
        - ruby
        - mysql
    
    
    spec:lib:
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
      tags:
        - ruby
        - mysql
    
    spec:services:
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
      tags:
        - ruby
        - mysql
    
    
    spec:benchmark:
      script:
        - RAILS_ENV=test bundle exec rake spec:benchmark
      tags:
        - ruby
        - mysql
    
      allow_failure: true
    
    spec:other:
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
      tags:
        - ruby
        - mysql
    
    
    Douwe Maan's avatar
    Douwe Maan committed
    spinach:project:half:
    
      script:
    
    Douwe Maan's avatar
    Douwe Maan committed
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half
      tags:
        - ruby
        - mysql
    
    spinach:project:rest:
    
      script:
    
    Douwe Maan's avatar
    Douwe Maan committed
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest
    
      tags:
        - ruby
        - mysql
    
    
      script:
    
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other
    
      tags:
        - ruby
        - mysql
    
    
      script:
    
        - RAILS_ENV=test bundle exec teaspoon
    
      tags:
        - ruby
        - mysql
    
    
      script:
        - bundle exec rubocop
      tags:
        - ruby
        - mysql
    
    
      script:
        - bundle exec rake brakeman
      tags:
        - ruby
    
    
    flog:
      script:
        - bundle exec rake flog
      tags:
        - ruby
        - mysql
    
    
    flay:
      script:
        - bundle exec rake flay
      tags:
        - ruby
        - mysql
    
    bundler:audit:
    
        - "bundle exec bundle-audit update"
        - "bundle exec bundle-audit check"
    
      tags:
        - ruby
        - mysql
    
    spec:feature:ruby21:
    
      only:
      - master
    
      script:
        - RAILS_ENV=test bundle exec rake assets:precompile 2>/dev/null
    
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:feature
      tags:
        - ruby
        - mysql
    
    spec:api:ruby21:
      image: ruby:2.1
      only:
      - master
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:api
      tags:
        - ruby
        - mysql
    
    spec:models:ruby21:
      image: ruby:2.1
      only:
      - master
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:models
    
    
    spec:lib:ruby21:
      image: ruby:2.1
    
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:lib
      tags:
        - ruby
        - mysql
    
    spec:services:ruby21:
    
      only:
      - master
    
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:services
    
    
    spec:benchmark:ruby21:
      image: ruby:2.1
    
      script:
        - RAILS_ENV=test bundle exec rake spec:benchmark
      tags:
        - ruby
        - mysql
      allow_failure: true
    
    spec:other:ruby21:
      image: ruby:2.1
      only:
      - master
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spec:other
      tags:
        - ruby
        - mysql
    
    spinach:project:half:ruby21:
      image: ruby:2.1
      only:
      - master
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:half
      tags:
        - ruby
        - mysql
    
    spinach:project:rest:ruby21:
      image: ruby:2.1
      only:
      - master
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:project:rest
      tags:
        - ruby
        - mysql
    
    spinach:other:ruby21:
      image: ruby:2.1
      only:
      - master
      script:
        - RAILS_ENV=test SIMPLECOV=true bundle exec rake spinach:other
      tags:
        - ruby
        - mysql