Last active
April 3, 2018 16:43
-
-
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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