just-paja/react-saga-rest

View on GitHub
.circleci/config.yml

Summary

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

    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - dependencies-{{ checksum "package.json" }}
          # fallback to using the latest cache if no exact match is found
          - dependencies-

      - run:
          name: Install dependencies
          command: npm install

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

      - run:
          name: Install code climate 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: Run tests
          command: npm test -- --coverage

      - run:
          name: Publish coverage
          command: ./cc-test-reporter after-build