-
Notifications
You must be signed in to change notification settings - Fork 13
/
circle.yml
41 lines (37 loc) · 1.05 KB
/
circle.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
machine:
environment:
NODE_ENV: test
node:
version: 6.4.0
dependencies:
pre:
- rm -rf ./node_modules
cache_directories:
- ~/.npm
override:
- npm prune && npm install
- npm run lint
post:
- wget https://saucelabs.com/downloads/sc-latest-linux.tar.gz
- tar -xzf sc-latest-linux.tar.gz
test:
pre:
- npm run build
override:
- cd sc-*-linux && ./bin/sc --user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY --readyfile ~/sauce_is_ready:
background: true
# Wait for tunnel to be ready
- while [ ! -e ~/sauce_is_ready ]; do sleep 1; done
- npm start:
background: true
# Wait for webpack build app and start server
- curl --retry 10 --retry-delay 2 -v http://localhost:8080
# Run unit tests on SauceLabs
- npm run test:unit
- npm run start:examples:
background: true
# Wait for example app to be ready
- curl --retry 10 --retry-delay 2 -v http://localhost:8081
- npm run test:e2e
post:
- killall --wait sc # Wait for Sauce Connect to close the tunnel