Didericis/itermproj

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
version: 2
jobs:
  build:
    docker:
      - image: circleci/node:8.11

    working_directory: ~/repo

    steps:
      - checkout

      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-

      - run: 
          name: Install NPM dependencies
          command: npm install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}

      - run:
          name: Install CC 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 CC Test Reporter Setup
          command: ./cc-test-reporter before-build

      - run: 
          name: Run Tests
          command: |
            npm test
            ./cc-test-reporter after-build --exit-code $?

      - store_artifacts:
          path: ./coverage