Skip to content

Instantly share code, notes, and snippets.

@lleger
Last active August 31, 2017 17:33
Show Gist options
  • Save lleger/93078aadd39a8f9001b13c3e030b78de to your computer and use it in GitHub Desktop.
Save lleger/93078aadd39a8f9001b13c3e030b78de to your computer and use it in GitHub Desktop.
CircleCI 2.0 + CodeClimate
version: 2
jobs:
build:
steps:
- type: cache-restore
name: Restore Code Climate cache
key: v1-code-climate-0.1.4
- run:
name: Install Code Climate reporter
command: |
if [[ ! -x cc-test-reporter ]]
then
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-0.1.4-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
fi
- type: cache-save
name: Save Code Climate cache
key: v1-code-climate-0.1.4
paths:
- ./cc-test-reporter
- run:
name: Report code coverage to Code Climate
command: |
./cc-test-reporter after-build -t simplecov --exit-code $? || true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment