# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
  build:
    docker:
      # specify the version you desire here
      - image: circleci/node:6.11

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - yarn-dependencies-{{ checksum "yarn.lock" }}
          # fallback to using the latest cache if no exact match is found
          - yarn-dependencies-

      - run: yarn install --ignore-engines
      - run: yarn test --ignore-engines

      - save_cache:
          name: Save yarn packages to cache
          key: yarn-dependencies-{{ checksum "yarn.lock" }}
          paths:
            - ~/.cache/yarn
            - ./node_modules
