UNPKG

2.22 kBYAMLView Raw
1version: 2
2
3defaults: &defaults
4 working_directory: ~/storybook-addon-jsx
5 docker:
6 - image: circleci/node:latest-browsers
7
8jobs:
9 install:
10 <<: *defaults
11 steps:
12 - checkout
13 - restore_cache:
14 keys:
15 # Find a cache corresponding to this specific package.json checksum
16 # when this file is changed, this key will fail
17 - storybook-addon-jsx-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
18 - storybook-addon-jsx-{{ .Branch }}-{{ checksum "yarn.lock" }}
19 - storybook-addon-jsx-{{ .Branch }}
20 # Find the most recent cache used from any branch
21 - storybook-addon-jsx-master
22 - storybook-addon-jsx-
23 - run:
24 name: Install Dependencies
25 command: yarn install --frozen-lockfile
26 - save_cache:
27 key: storybook-addon-jsx-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
28 paths:
29 - node_modules
30 - ~/.cache/yarn
31 - persist_to_workspace:
32 root: .
33 paths:
34 - .
35
36 test:
37 <<: *defaults
38 steps:
39 - attach_workspace:
40 at: ~/storybook-addon-jsx
41 - run:
42 name: Test
43 command: yarn test
44
45 lint:
46 <<: *defaults
47 steps:
48 - attach_workspace:
49 at: ~/storybook-addon-jsx
50 - run:
51 name: Lint
52 command: yarn lint
53
54 build:
55 <<: *defaults
56 steps:
57 - attach_workspace:
58 at: ~/storybook-addon-jsx
59 - run:
60 name: Build
61 command: yarn build
62 - persist_to_workspace:
63 root: .
64 paths:
65 - .
66
67 release:
68 <<: *defaults
69 steps:
70 - attach_workspace:
71 at: ~/storybook-addon-jsx
72 - run:
73 name: Release
74 command: yarn run release
75
76workflows:
77 version: 2
78 build_and_test:
79 jobs:
80 - install
81
82 - test:
83 requires:
84 - install
85
86 - lint:
87 requires:
88 - install
89
90 - build:
91 requires:
92 - install
93
94 - release:
95 requires:
96 - lint
97 - test
98 - build