semaphore: # Default `.semaphore/semaphore.yml` contents version: v1.0 name: AppSignal Ruby Build and Tests agent: machine: type: e1-standard-2 os_image: ubuntu1804 # Cancel all running and queued workflows before this one auto_cancel: running: # Ignore master AND develop branch as we want it to build all workflows when: "branch != 'master' AND branch != 'develop'" global_job_config: env_vars: - name: _BUNDLER_CACHE value: "v2" - name: _GEMS_CACHE value: "v2" - name: BUNDLE_PATH value: "../.bundle/" - name: RUNNING_IN_CI value: "true" - name: RAILS_ENV value: "test" - name: JRUBY_OPTS value: "" - name: COV value: "1" prologue: commands: - checkout - sem-version ruby $RUBY_VERSION - ./support/check_versions - cache restore $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE),$_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET,$_BUNDLER_CACHE-bundler-$RUBY_VERSION - cache restore $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE),$_GEMS_CACHE-gems-$RUBY_VERSION - ./support/install_deps - bundle config set clean 'true' - ./support/bundler_wrapper install --jobs=3 --retry=3 epilogue: on_pass: commands: - cache store $_BUNDLER_CACHE-bundler-$RUBY_VERSION-$GEMSET-$(checksum $BUNDLE_GEMFILE) .bundle - cache store $_GEMS_CACHE-gems-$RUBY_VERSION-$(checksum $BUNDLE_GEMFILE) $HOME/.gem on_fail: commands: - "[ -e ext/install.report ] && cat ext/install.report || echo 'No ext/install.report file found'" - "[ -f ext/mkmf.log ] && cat ext/mkmf.log || echo 'No ext/mkmf.log file found'" blocks: - name: Validation dependencies: [] task: jobs: - name: Validate CI setup env_vars: - name: RUBY_VERSION value: 2.6.5 - name: GEMSET value: no_dependencies - name: BUNDLE_GEMFILE value: gemfiles/no_dependencies.gemfile commands: - ./support/bundler_wrapper exec rake build_matrix:semaphore:validate - name: Linters dependencies: [] task: jobs: - name: RuboCop env_vars: - name: RUBY_VERSION value: 2.6.5 - name: GEMSET value: no_dependencies - name: BUNDLE_GEMFILE value: gemfiles/no_dependencies.gemfile commands: - ./support/bundler_wrapper exec rubocop matrix: defaults: rubygems: "latest" bundler: "latest" gemsets: # By default all gems are tested none: - "no_dependencies" minimal: - "no_dependencies" - "rails-5.2" - "rails-6.0" ruby: - ruby: "1.9.3-p551" rubygems: "2.7.8" bundler: "1.17.3" gems: "none" - ruby: "2.0.0-p648" rubygems: "2.7.8" bundler: "1.17.3" - ruby: "2.1.10" rubygems: "2.7.8" bundler: "1.17.3" gems: "none" - ruby: "2.2.10" rubygems: "2.7.8" bundler: "1.17.3" gems: "none" - ruby: "2.3.8" gems: "none" - ruby: "2.4.9" gems: "none" - ruby: "2.5.7" gems: "minimal" - ruby: "2.6.5" - ruby: "2.7.0" - ruby: "jruby-9.1.17.0" gems: "minimal" gems: - gem: "no_dependencies" - gem: "capistrano2" - gem: "capistrano3" - gem: "grape" - gem: "padrino" bundler: "1.17.3" - gem: "que" - gem: "que_beta" exclude: ruby: - "2.0.0-p648" - gem: "rails-3.2" bundler: "1.17.3" exclude: ruby: - "2.6.5" - "2.7.0" - gem: "rails-4.2" bundler: "1.17.3" exclude: ruby: - "2.6.5" - "2.7.0" - gem: "rails-5.0" exclude: ruby: - "2.0.0-p648" - gem: "rails-5.1" exclude: ruby: - "2.0.0-p648" - gem: "rails-5.2" exclude: ruby: - "2.0.0-p648" - gem: "rails-6.0" exclude: ruby: - "2.0.0-p648" - "2.1.10" - "2.2.10" - "2.3.8" - "2.4.9" - "jruby-9.1.17.0" - gem: "resque" bundler: "1.17.3" - gem: "sequel" - gem: "sequel-435" - gem: "sinatra" - gem: "webmachine"