version: 2 workflows: version: 2 build_and_test: jobs: - prep-deps - test-lint: requires: - prep-deps - test-coverage: requires: - prep-deps - test-integration: requires: - prep-deps jobs: prep-deps: docker: - image: circleci/node:8-browsers steps: - checkout - run: name: Update npm command: 'sudo npm install -g npm@latest' - restore_cache: key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Install npm command: npm install - save_cache: key: dependency-cache-{{ checksum "package-lock.json" }} paths: - node_modules test-lint: docker: - image: circleci/node:8-browsers steps: - checkout - restore_cache: key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: Test command: npm run lint test-coverage: docker: - image: circleci/node:8-browsers steps: - checkout - restore_cache: key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: test:coverage command: npm run test:coverage test-integration: docker: - image: circleci/node:8-browsers steps: - checkout - restore_cache: key: dependency-cache-{{ checksum "package-lock.json" }} - run: name: test:integration command: npm run test:integration