-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy path.travis.yml
88 lines (66 loc) · 2.38 KB
/
.travis.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
87
88
language: node_js
node_js:
- 5.4.0
# before_install:
# - export CHROME_BIN=/usr/bin/google-chrome
# - export DISPLAY=:99.0
# - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
# - sudo apt-get update
# - sudo apt-get install -y libappindicator1 fonts-liberation
# - wget http://deepin.mirror.garr.it/mirrors/deepin/pool/non-free/g/google-chrome-stable/google-chrome-stable_47.0.2526.80-1_amd64.deb
# - sudo dpkg -i google-chrome*.deb
# - npm install semver
# - export NPM_V=$(npm -v)
# - 'if node -e "process.exit(require(''semver'').gt(process.env.NPM_V, ''3.0.0''))"; then npm install -g [email protected]; fi'
install:
- npm install
before_script:
# - "npm run webdriver:start &"
script:
# Linting
- npm run lint
# Minification tests
- npm run build
- "if [ $(du -k ./dist/public/vendor.js | cut -f1) -gt 950 ]; then exit 1; fi"
- "if [ $(du -k ./dist/public/browser.js | cut -f1) -gt 10 ]; then exit 1; fi"
- "if [ $(du -k ./dist/public/worker.js | cut -f1) -gt 5 ]; then exit 1; fi"
- "if [ $(du -k ./dist/public/worker_app.js | cut -f1) -gt 12 ]; then exit 1; fi"
# Starting/stopping
- npm start
- npm stop
# Unit tests
- npm run unit
# - "kill $(lsof -t -i:3000) | true"
# - NG2_WW=true NG2_SS=true $(npm bin)/pm2 start ecosystem.json
# - npm run e2e
# - $(npm bin)/pm2 delete ecosystem.json;
# - "kill $(lsof -t -i:3000) | true"
# - NG2_WW=false NG2_SS=true $(npm bin)/pm2 start ecosystem.json
# - npm run e2e
# - $(npm bin)/pm2 delete ecosystem.json;
# - "kill $(lsof -t -i:3000) | true"
# - NG2_WW=false NG2_SS=false $(npm bin)/pm2 start ecosystem.json
# - npm run e2e
# - $(npm bin)/pm2 delete ecosystem.json;
# - "kill $(lsof -t -i:3000) | true"
# - "NG2_WW=true NG2_SS=true npm run dev &"
# - DEV_SERVER_PID=$!
# - sleep 5
# - npm run e2e
# - kill $DEV_SERVER_PID
# - "kill $(lsof -t -i:3000) | true"
# - "NG2_WW=false NG2_SS=true npm run dev &"
# - DEV_SERVER_PID=$!
# - sleep 5
# - npm run e2e
# - kill $DEV_SERVER_PID
# - "kill $(lsof -t -i:3000) | true"
# - "NG2_WW=false NG2_SS=false npm run dev &"
# - DEV_SERVER_PID=$!
# - sleep 5
# - npm run e2e
# - kill $DEV_SERVER_PID
# - "kill $(lsof -t -i:3000) | true"
# - npm restart
# - npm test
# - npm stop