version: 2.1 jobs: build: docker: - image: circleci/ruby:2.7.1 environment: CC_TEST_REPORTER_ID: 47b57fbbf65654b17f33b6ff4a108ce2abed31a86468033f20eb4d4e9e09935a RAILS_ENV: test steps: - checkout - run: name: Install Bundler command: gem install bundler - run: name: Which bundler? command: bundle -v - run: name: Bundle Install command: bundle check || bundle install - run: name: Lint using rubocop command: bundle exec rubocop - 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 ./cc-test-reporter before-build - run: name: rspec command: bundle exec rspec - run: name: upload test coverage report to Code Climate command: ./cc-test-reporter after-build --coverage-input-type simplecov --exit-code $?