just-paja/redux-entity-routines

View on GitHub
.circleci/config.yml

Summary

Maintainability
Test Coverage
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      - image: circleci/node:10

    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - dependencies-{{ checksum "package-lock.json" }}

      - run:
          name: Install dependencies
          command: npm ci

      - save_cache:
          paths:
            - $HOME/.npm
          key: dependencies-{{ checksum "package-lock.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: Run build
          command: npm run build

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