jobs: setup: docker: - image: circleci/ruby:2.7.0 environment: BUNDLE_JOBS: 3 BUNDLE_RETRY: 3 BUNDLE_PATH: vendor/bundle steps: - checkout - restore_cache: keys: - renderful-v1-{{ .Branch }}-{{ .Revision }} - renderful-v1-{{ .Branch }} - renderful-v1- - run: name: Bundle install command: bundle check || bundle install - run: name: Appraisal install command: bundle exec appraisal install - save_cache: key: renderful-v1-{{ .Branch }}-{{ .Revision }} paths: - vendor/bundle test: docker: - image: circleci/ruby:2.7.0 environment: BUNDLE_PATH: vendor/bundle steps: - checkout - restore_cache: keys: - renderful-v1-{{ .Branch }}-{{ .Revision }} - run: name: Run RSpec command: | bundle exec appraisal rspec --profile 10 \ --format RspecJunitFormatter \ --out test_results/rspec.xml \ --format progress \ $(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings) - store_test_results: path: test_results lint: docker: - image: circleci/ruby:2.7.0 environment: BUNDLE_PATH: vendor/bundle steps: - checkout - restore_cache: keys: - renderful-v1-{{ .Branch }}-{{ .Revision }} - run: name: Run RuboCop command: bundle exec rubocop workflows: version: 2 test-and-lint: jobs: - setup - test: requires: - setup - lint: requires: - setup