UNPKG

2.02 kBYAMLView Raw
1## IMPORTANT
2# If you change the cache key prefix, also sync the restore_cache fallback to match.
3# Keep the static part of the cache key as prefix to enable correct fallbacks.
4# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
5var_1: &default_docker_image circleci/node:10.12
6var_2: &cache_key rxjs-node-10.12-{{ checksum "package-lock.json" }}
7
8# Settings common to each job
9var_3: &defaults
10 working_directory: ~/ng
11 docker:
12 - image: *default_docker_image
13
14var_4: &restore_cache
15 restore_cache:
16 keys:
17 - *cache_key
18 # This fallback should be the cache_key without variables.
19 - rxjs-0.7.0-
20var_5: &attach_options
21 at: .
22
23version: 2
24jobs:
25 build:
26 docker:
27 - image: *default_docker_image
28 steps:
29 - checkout
30 - *restore_cache
31 - run: npm i
32 - run: npm run build_all
33 - persist_to_workspace:
34 root: .
35 paths:
36 - ./*
37 - save_cache:
38 key: *cache_key
39 paths:
40 - ./node_modules
41
42 lint:
43 <<: *defaults
44 steps:
45 - attach_workspace: *attach_options
46 - run: npm run lint
47
48 test:
49 <<: *defaults
50 steps:
51 - attach_workspace: *attach_options
52 - run: npm test
53 - run: npm run test:side-effects
54
55 dtslint:
56 <<: *defaults
57 steps:
58 - attach_workspace: *attach_options
59 - run: npm run dtslint
60
61 api_guardian:
62 <<: *defaults
63 steps:
64 - attach_workspace: *attach_options
65 - run: npm run api_guardian
66
67 typescript3:
68 <<: *defaults
69 steps:
70 - attach_workspace: *attach_options
71 - run: npm i --no-save typescript@3.*
72 - run: npm run build_cjs
73
74workflows:
75 version: 2
76 build_and_test:
77 jobs:
78 - build
79 - lint:
80 requires:
81 - build
82 - test:
83 requires:
84 - build
85 - dtslint:
86 requires:
87 - build
88 - typescript3:
89 requires:
90 - lint
91 - test
92 - dtslint
\No newline at end of file