version: 2.1 orbs: ruby: circleci/ruby@1.1.2 sonarcloud: sonarsource/sonarcloud@1.0.2 jobs: "rubocop": docker: - image: circleci/ruby:2.7-node steps: - checkout - run: gem install bundler - run: bundle update - run: bundle exec rubocop --format=json --out=rubocop-result.json - store_test_results: path: rubocop-result.json - sonarcloud/scan - run: bundle exec rubocop "ruby-two-five": docker: - image: circleci/ruby:2.5 - image: rabbitmq:3.7 steps: - checkout - run: gem install bundler - run: bundle update - run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml - store_test_results: path: rspec-results.xml - sonarcloud/scan "ruby-two-six": docker: - image: circleci/ruby:2.6 - image: rabbitmq:3.7 steps: - checkout - run: gem install bundler - run: bundle update - run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml - store_test_results: path: rspec-results.xml - sonarcloud/scan "ruby-two-seven": docker: - image: circleci/ruby:2.7 - image: rabbitmq:3.7 steps: - checkout - run: gem install bundler - run: bundle update - run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml - store_test_results: path: rspec-results.xml - sonarcloud/scan "ruby-three": docker: - image: circleci/ruby:3-node - image: rabbitmq:3.7 steps: - checkout - run: gem install bundler - run: bundle update - run: bundle exec rspec --format progress --format RspecJunitFormatter -o rspec-results.xml - store_test_results: path: rspec-results.xml - sonarcloud/scan workflows: version: 2 rubocop-rspec: jobs: - rubocop - ruby-two-five: requires: - rubocop - ruby-two-six: requires: - ruby-two-five - ruby-two-seven: requires: - ruby-two-five - ruby-three: requires: - ruby-two-five