Skip to content

Instantly share code, notes, and snippets.

@corinneling
Last active April 3, 2018 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corinneling/a7a397b91d32c929cf883c2579a5e250 to your computer and use it in GitHub Desktop.
Save corinneling/a7a397b91d32c929cf883c2579a5e250 to your computer and use it in GitHub Desktop.
Taking the config.yml file Circle Ci gave me for node, with correct settings for Code Climate 2.0
version: 2
jobs:
build:
environment:
CC_TEST_REPORTER_ID: { CodeClimateId }
docker:
- image: circleci/node:7.10
working_directory: ~/repo
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run: npm install
- save_cache:
paths:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}
- 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 tests!
- run:
name: tests
command: |
./cc-test-reporter before-build
npm run test:ci
./cc-test-reporter after-build --coverage-input-type lcov --exit-code $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment