version: 2
jobs:
  build:
    docker:
      - image: circleci/node:7.10

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "yarn.lock" }}

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "yarn.lock" }}

      # Prep yarn global adds
      - run: |
          mkdir ~/.yarn-global
          yarn config set prefix ~/.yarn-global
          export PATH="$PATH:$(yarn global bin)"

      # Install globals needed for Github integrations
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          yarn global add greenkeeper-lockfile@1.7.2
          yarn global add coveralls@2.13.1

      # Update yarn.lock
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          greenkeeper-lockfile-update

      - run: yarn test -- --coverage

      # Commit and push yarn.lock
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          greenkeeper-lockfile-upload

      # Send coverage to Coveralls
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          cat ./.coverage/lcov.info | coveralls

version: 2
jobs:
  build:
    docker:
      - image: circleci/node:7.10

    working_directory: ~/repo

    steps:
      - checkout

      # Download and cache dependencies
      - restore_cache:
          keys:
          - v1-dependencies-{{ checksum "yarn.lock" }}

      - run: yarn install

      - save_cache:
          paths:
            - node_modules
          key: v1-dependencies-{{ checksum "yarn.lock" }}

      # Prep yarn global adds
      - run: |
          mkdir ~/.yarn-global
          yarn config set prefix ~/.yarn-global
          export PATH="$PATH:$(yarn global bin)"

      # Install globals needed for Github integrations
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          yarn global add greenkeeper-lockfile@1.7.2
          yarn global add coveralls@2.13.1

      # Update yarn.lock
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          greenkeeper-lockfile-update

      - run: yarn test -- --coverage

      - run: yarn run lint

      - run: yarn run build

      # Commit and push yarn.lock
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          greenkeeper-lockfile-upload

      # Send coverage to Coveralls
      - run: |
          export PATH="$PATH:$(yarn global bin)"
          cat ./.coverage/lcov.info | coveralls

Add lint and build commands to CI
Add lint and build commands to CI
