-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathconfig.yml
86 lines (83 loc) · 1.99 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
test: &test
working_directory: ~/repo
steps:
- checkout
- run:
name: Print system information
command: |
echo "node $(node -v)"
echo "npm v$(npm --version)"
- run:
name: Install dependencies
command: sudo apt-get update && sudo apt-get install dbus-x11 -y
- restore_cache:
keys:
- v1-npm-deps-{{ checksum "package.json" }}
- v1-npm-deps
- run:
name: npm install
command: npm install
- save_cache:
key: v1-npm-deps-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: npm test
command: npm test
publish: &publish
working_directory: ~/repo
steps:
- checkout
- run:
name: Print system information
command: |
echo "node $(node -v)"
echo "npm v$(npm --version)"
- run:
name: Install dependencies
command: sudo apt-get update && sudo apt-get install dbus-x11 -y
# Do not explicitly use caching when publishing
- run:
name: npm install
command: npm install
- run:
name: set npm auth token
command: npm config set "//registry.npmjs.org/:_authToken" $NPM_AUTH
- run:
name: npm publish
command: npm publish
version: 2
jobs:
test-node6:
<<: *test
docker:
- image: circleci/node:6-browsers
test-node7:
<<: *test
docker:
- image: circleci/node:7-browsers
test-node-latest:
<<: *test
docker:
- image: circleci/node:latest-browsers
publish:
<<: *publish
docker:
- image: circleci/node:6-browsers
workflows:
version: 2
build-test-and-publish:
jobs:
- test-node6
- test-node7
- test-node-latest
- publish:
filters:
tags:
only: '/v?[0-9]+(\.[0-9]+)*(-.+)?/'
branches:
ignore: /.*/
requires:
- test-node6
- test-node7
- test-node-latest