-
-
Notifications
You must be signed in to change notification settings - Fork 768
/
config.yml
78 lines (73 loc) · 2.34 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
version: 2
jobs:
build-common: &common-build
docker:
- image: node
working_directory: ~/sinon
steps:
- run:
name: Versions
command: |
npm version
- checkout
- restore_cache:
keys:
- v3-npm-{{ .Branch }}-{{ checksum "package.json" }}
- v3-npm-master-{{ checksum "package.json" }}
- run:
name: Install dependencies
command: |
npm config set strict-ssl false
# puppeteer install script throws syntax errors for Node v4
# https://github.com/GoogleChrome/puppeteer/blob/f19e2ade0d4859435422131905e932abe3db199c/install.js#L66
if node --version | grep -q '^v4'; then
npm config set ignore-scripts true
npm install
npm config set ignore-scripts false
else
npm install
fi
# install latest chrome unstable version
if node --version | grep -q '^v6'; then
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list
apt-get update
apt-get install -y --no-install-recommends google-chrome-unstable
fi
- run:
name: Pre-Test
# ESLint only supports Node >=4
command: |
if node --version | grep -q '^v6'; then
npm run lint;
npm run test-headless -- --chrome $(which google-chrome-unstable) --allow-chrome-as-root;
npm run test-webworker -- --chrome $(which google-chrome-unstable) --allow-chrome-as-root;
fi
- run:
name: Test
command: npm run test-node
- save_cache:
key: v3-npm-{{ .Branch }}-{{ checksum "package.json" }}
paths:
- node_modules
node-4:
<<: *common-build
docker:
- image: node:4-alpine
node-6:
<<: *common-build
docker:
- image: node:6
node-8:
<<: *common-build
docker:
- image: node:8-alpine
environment:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
workflows:
version: 2
build:
jobs:
- node-4
- node-6
- node-8