# Ruby CircleCI 2.0 configuration file # # Check https://circleci.com/docs/2.0/language-ruby/ for more details # common_steps: &common_steps - checkout - run: gem update --system - restore_cache: key: gem-cache-{{ .Branch }}-{{ checksum "request_handler.gemspec" }} - run: name: install dependencies command: | gem update bundler bundle install --jobs=4 --retry=3 --path vendor/bundle - save_cache: key: gem-cache-{{ .Branch }}-{{ checksum "request_handler.gemspec" }} paths: - vendor/bundle - run: ruby -v - run: name: run tests command: | mkdir /tmp/test-results TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \ circleci tests split --split-by=timings)" bundle exec rspec \ --format progress \ --format RspecJunitFormatter \ --out /tmp/test-results/rspec.xml \ --format progress \ $TEST_FILES # collect reports - store_test_results: path: /tmp/test-results - store_artifacts: path: /tmp/test-results destination: test-results version: 2 jobs: ruby-2.6: docker: - image: circleci/ruby:2.6 steps: *common_steps ruby-2.7: docker: - image: circleci/ruby:2.7 steps: *common_steps ruby-3.0: docker: - image: circleci/ruby:3.0 steps: *common_steps jruby-9.3: docker: - image: circleci/jruby:9.3 steps: *common_steps jruby-9.3-indy: docker: - image: circleci/jruby:9.3 environment: JRUBY_OPTS: '-Xcompile.invokedynamic=true' steps: *common_steps workflows: version: 2 build: jobs: - ruby-2.6 - ruby-2.7 - ruby-3.0 - jruby-9.3 - jruby-9.3-indy