/
config.yml
59 lines (56 loc) · 1.43 KB
/
config.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
version: 2.1
orbs:
node: artsy/node@0.1.0
yarn: artsy/yarn@0.0.2
jobs:
lint:
executor: node/build
steps:
- yarn/setup
- run: yarn lint
type-check:
executor: node/build
steps:
- yarn/setup
- run: yarn type-check
deploy:
executor: node/build
steps:
- add_ssh_keys
- yarn/setup
# Setup the .npmrc with the proper registry and auth token to publish
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: yarn release
test:
executor: node/build
steps:
- yarn/setup
# Runs jest tests with 6 concurrent workers. Without limiting it to 6
# workers Jest will spawn many memory hungry workers and ultimately
# starve the job for memory.
- run: yarn test -w 6
update-cache:
executor: node/build
steps:
- yarn/update_dependencies
workflows:
build_and_verify:
jobs:
- update-cache
- lint
- type-check
- test
- deploy:
# The deploy job is the _only_ job that should have access to our npm
# tokens. We include a context that has our publish credentials
# explicitly in this step. https://circleci.com/docs/2.0/contexts/
context: npm-deploy
filters:
branches:
only:
- master
requires:
- test
- lint
- type-check
- update-cache