# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
general:
  artifacts:
    - "coverage/"
jobs:
  build:
    environment:
      - CC_TEST_REPORTER_ID: "96b517fb03268c9679d5e18fb9d63570c7922d62c2f6190890576c6cd6a14c2e"

    docker:
      - image: circleci/node:7.10

    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-
      - run: yarn install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run:
          name: Configure Test 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: yarn test
      - run:
          name: Upload Test Results
          command: |
              ./cc-test-reporter format-coverage -t lcov coverage/lcov.info
              ./cc-test-reporter upload-coverage
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    environment:
      - CC_TEST_REPORTER_ID: "96b517fb03268c9679d5e18fb9d63570c7922d62c2f6190890576c6cd6a14c2e"

    docker:
      - image: circleci/node:7.10

    working_directory: ~/repo

    steps:
      - checkout
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "package.json" }}
          - v1-dependencies-
      - run: yarn install
      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "package.json" }}
      - run:
          name: Configure Test 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: yarn test
      - store_artifacts:
          path: /coverage
      - run:
          name: Upload Test Results
          command: |
              ./cc-test-reporter format-coverage -t lcov coverage/lcov.info
              ./cc-test-reporter upload-coverage
Store coverage as artifacts on circleci
Store coverage as artifacts on circleci
