Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
323 lines (285 sloc) 8.22 KB
image: ruby:$RUBY_VERSION
cache:
key: "$RUBY_VERSION"
paths:
- $CI_PROJECT_DIR/vendor/bundle
variables:
SKYLIGHT_EXT_STRICT: "false"
SKYLIGHT_REQUIRED: "true"
SKYLIGHT_ENABLE_TRACE_LOGS: "true"
SKYLIGHT_TEST_DIR: "/tmp"
RAILS_ENV: "development"
EMBEDDED_HTTP_SERVER_TIMEOUT: "30"
WORKER_SPAWN_TIMEOUT: "15"
COVERAGE_DIR: $CI_PROJECT_DIR/coverage
CORE_COVERAGE_DIR: $CI_PROJECT_DIR/skylight-core/coverage
DISABLED_COVERAGE_DIR: $CI_PROJECT_DIR/coverage-disabled
CORE_DISABLED_COVERAGE_DIR: $CI_PROJECT_DIR/skylight-core/coverage-disabled
BUNDLE_PATH: $CI_PROJECT_DIR/vendor/bundle
.run_tests: &run_tests
before_script:
- gem install bundler
- |
if [[ "$BUNDLE_GEMFILE" =~ "rails-4.2" ]]; then
gem install bundler -v "< 2"
export BUNDLER_VERSION=1
fi
script:
- pushd skylight-core
- bundle install
- COVERAGE_DIR=$CORE_COVERAGE_DIR bundle exec rake
- COVERAGE_DIR=$CORE_DISABLED_COVERAGE_DIR SKYLIGHT_DISABLE_AGENT=true bundle exec rake
- popd
- bundle install
- bundle exec rake
- COVERAGE_DIR=$DISABLED_COVERAGE_DIR SKYLIGHT_DISABLE_AGENT=true bundle exec rake
after_script:
- if [ -f $COVERAGE_DIR/.resultset.json ]; then mv $COVERAGE_DIR/.resultset.json $COVERAGE_DIR/coverage-$CI_JOB_ID.json; fi
- if [ -f $DISABLED_COVERAGE_DIR/.resultset.json ]; then mv $DISABLED_COVERAGE_DIR/.resultset.json $COVERAGE_DIR/coverage-disabled-$CI_JOB_ID.json; fi
- if [ -f $CORE_COVERAGE_DIR/.resultset.json ]; then mv $CORE_COVERAGE_DIR/.resultset.json $COVERAGE_DIR/coverage-core-$CI_JOB_ID.json; fi
- if [ -f $CORE_DISABLED_COVERAGE_DIR/.resultset.json ]; then mv $CORE_DISABLED_COVERAGE_DIR/.resultset.json $COVERAGE_DIR/coverage-core-disabled-$CI_JOB_ID.json; fi
artifacts:
paths:
- $COVERAGE_DIR/coverage-$CI_JOB_ID.json
- $COVERAGE_DIR/coverage-disabled-$CI_JOB_ID.json
- $COVERAGE_DIR/coverage-core-$CI_JOB_ID.json
- $COVERAGE_DIR/coverage-core-disabled-$CI_JOB_ID.json
.install_codeclimate: &install_codeclimate
image: ruby:2.6.2 # can probably use a lighter image, but this one is already cached.
before_script:
- if [[ ! -f cc-test-reporter ]]; then curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter; fi
- chmod +x ./cc-test-reporter
cache:
key: "codeclimate"
paths:
- cc-test-reporter
only:
variables:
- $COVERAGE == "true"
stages:
- smoke_test
- test
- wrapup
codeclimate_setup:
stage: smoke_test
<<: *install_codeclimate
script:
- ./cc-test-reporter before-build
codeclimate:
stage: wrapup
<<: *install_codeclimate
script:
- mkdir -p formatted_coverage
- find coverage -name *.json | xargs -I % ./cc-test-reporter format-coverage -t simplecov -o formatted_coverage/% %
- ./cc-test-reporter sum-coverage formatted_coverage/**/*.json
- ./cc-test-reporter upload-coverage
ruby26-rails52:
<<: *run_tests
stage: smoke_test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-5.2.x
ruby26-rails60:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-6.0.x
ruby23-rails42:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.3.8"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
ruby26-rails42:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
ruby23-rails52:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.3.8"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-5.2.x
ruby26-rails50:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-5.0.x
ruby26-rails51:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-5.1.x
ruby26-rails-edge:
<<: *run_tests
stage: test
allow_failure: true
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-edge
ruby23-sinatra14:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.3.8"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.sinatra-1.4.x
ruby26-sinatra14:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.sinatra-1.4.x
ruby23-sinatra20:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.3.8"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.sinatra-2.0.x
ruby26-sinatra20:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.sinatra-2.0.x
ruby26-sinatra-edge:
<<: *run_tests
stage: test
allow_failure: true
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.sinatra-edge
ruby23-grape:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.3.8"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.grape
ruby26-grape:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.grape
ruby26-grape013:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.grape
GRAPE_VERSION: "~> 0.13.0"
ruby26-grape110:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.grape
GRAPE_VERSION: "~> 1.1.0"
ruby26-grape120:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.grape
GRAPE_VERSION: "~> 1.2.0"
ruby26-grape-edge:
<<: *run_tests
stage: test
allow_failure: true
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.grape
GRAPE_VERSION: edge
ruby26-rails42-tilt:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
TILT_VERSION: 1.4.1
ruby26-sinatra14-sequel:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.sinatra-1.4.x
SEQUEL_VERSION: 4.34.0
ruby26-rails42-mongo:
<<: *run_tests
stage: test
services:
- mongo:3.4-jessie
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
TEST_MONGO_INTEGRATION: "true"
MONGO_HOST: mongo
ruby26-rails42-mongoid:
<<: *run_tests
stage: test
services:
- mongo:3.4-jessie
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
TEST_MONGO_INTEGRATION: "true"
MONGO_HOST: mongo
MONGOID_VERSION: "~> 4.0"
ruby26-rails42-elasticsearch:
<<: *run_tests
stage: test
services:
- elasticsearch:5-alpine
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
TEST_ELASTICSEARCH_INTEGRATION: "true"
ELASTICSEARCH_URL: "http://elasticsearch:9200"
ruby26-rails51-sidekiq4:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-5.1.x
SIDEKIQ_VERSION: 4.2.10
ruby26-rails51-sidekiq-none:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-5.1.x
SIDEKIQ_VERSION: "none"
ruby26-rails42-ams83:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
AMS_VERSION: "~> 0.8.3"
ruby26-rails42-ams95:
<<: *run_tests
stage: test
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
AMS_VERSION: "~> 0.9.5"
ruby26-rails42-ams-edge:
<<: *run_tests
stage: test
allow_failure: true
variables:
RUBY_VERSION: "2.6.2"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-4.2.x
AMS_VERSION: edge
ruby-head-rails60:
<<: *run_tests
stage: test
allow_failure: true
image: rubocophq/ruby-snapshot:latest
variables:
RUBY_VERSION: "2.7-dev"
BUNDLE_GEMFILE: $CI_PROJECT_DIR/gemfiles/Gemfile.rails-6.0.x
You can’t perform that action at this time.