aboutsummaryrefslogtreecommitdiffstats
path: root/.circleci/config.yml
blob: 06506c680e141eb57dce75b50036303617c8a5c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
version: 2

workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - test:
          requires:
            - build

jobs:
  build:
    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:
    docker:
      - image: circleci/node:8-browsers
    steps:
      - checkout
      - restore_cache:
          key: dependency-cache-{{ checksum "package-lock.json" }}
      - run:
          name: Test
          command: npm test