version: 2
jobs:
  test:
    docker:
      - image: circleci/node:4-browsers
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run: npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH
      - run: make test
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - node_modules
  publish:
    docker:
      - image: circleci/node:4-browsers
    steps:
      - attach_workspace: { at: . }
      - run: npm publish .
workflows:
  version: 2
  test_and_publish:
    jobs:
      - test
      - publish:
          requires:
            - test
          filters:
            tags:
              only: /[0-9]+(\.[0-9]+)*(-.+)?/
            branches:
              only: master

version: 2
jobs:
  test:
    docker:
      - image: circleci/node:4-browsers
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package.json" }}
      - run: npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH
      - run: make install
      - run: make test
      - save_cache:
          key: dependency-cache-{{ checksum "package.json" }}
          paths:
            - node_modules
  publish:
    docker:
      - image: circleci/node:4-browsers
    steps:
      - attach_workspace: { at: . }
      - run: npm publish .
workflows:
  version: 2
  test_and_publish:
    jobs:
      - test
      - publish:
          requires:
            - test
          filters:
            tags:
              only: /[0-9]+(\.[0-9]+)*(-.+)?/
            branches:
              only: master

Split install into it's own step.
Split install into it's own step.

Idea here is to seperate the commands for two reasons:
* see their output seperately
* time them seperately so we can better understand where the bottlenecks are (though 99.999% sure it's saucelabs :P)
