UNPKG

1.26 kBYAMLView Raw
1version: 2
2
3aliases:
4 - &restore-cache
5 restore_cache:
6 key: dependency-cache-{{ checksum "package.json" }}
7 - &install-deps
8 run:
9 name: Install dependencies
10 command: npm ci
11 - &build-packages
12 run:
13 name: Build
14 command: npm run build
15
16jobs:
17 build:
18 working_directory: ~/nest
19 docker:
20 - image: circleci/node:12
21 steps:
22 - checkout
23 - run:
24 name: Update NPM version
25 command: 'sudo npm install -g npm@latest'
26 - restore_cache:
27 key: dependency-cache-{{ checksum "package.json" }}
28 - run:
29 name: Install dependencies
30 command: npm ci
31 - save_cache:
32 key: dependency-cache-{{ checksum "package.json" }}
33 paths:
34 - ./node_modules
35 - run:
36 name: Build
37 command: npm run build
38
39 integration_tests:
40 working_directory: ~/nest
41 docker:
42 - image: circleci/node:12
43 steps:
44 - checkout
45 - *restore-cache
46 - *install-deps
47 - run:
48 name: Integration tests
49 command: npm run test:integration
50
51workflows:
52 version: 2
53 build-and-test:
54 jobs:
55 - build
56 - integration_tests:
57 requires:
58 - build
59
\No newline at end of file