version: 2.1 executors: default: working_directory: ~/repo description: The official CircleCI Ruby Docker image docker: - image: circleci/ruby:2.6.3-node caches: - &bundle_cache v1-repo-{{ checksum "Gemfile.lock" }} commands: run_linters: description: command to start linters steps: - run: name: rubocop command: bundle exec rubocop - run: name: fasterer command: bundle exec fasterer run_specs: steps: - run: name: run specs command: | mkdir /tmp/test-results TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)" bundle exec rspec --format progress \ --out /tmp/test-results/rspec.xml \ --format progress \ $TEST_FILES defaults: steps: - checkout - restore_cache: key: *bundle_cache - run: gem install bundler:2.0.2 - run: bundle install - save_cache: key: *bundle_cache paths: - bundle vendor/bundle jobs: lintering: executor: default steps: - defaults - run_linters run_specs: executor: default steps: - defaults - run_specs workflows: version: 2. build: jobs: - lintering: filters: branches: only: develop - run_specs: filters: branches: only: develop requires: - lintering