version: 2 jobs: build: environment: CC_TEST_REPORTER_ID: 259b37cf1fd88604007648fdd1a3df71a73ee30c4bc935f03d10a6d3e38ac964 working_directory: ~/itunes-api docker: - image: circleci/ruby:2.7-rc steps: - checkout - type: cache-restore name: Restore bundle cache key: itunes-api-{{ checksum "Gemfile.lock" }} - run: bundle install --path vendor/bundle - type: cache-save name: Store bundle cache key: itunes-api-{{ checksum "Gemfile.lock" }} paths: - vendor/bundle - run: name: Setup Code Climate test-reporter command: | curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter chmod +x ./cc-test-reporter - run: name: Run tests command: | ./cc-test-reporter before-build bundle exec rspec ./cc-test-reporter after-build --exit-code $? - run: bundle exec rubocop - store_test_results: path: coverage