-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
107 lines (92 loc) · 3.57 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
language: node_js
matrix:
include:
#Specify/enable node versions
# - node_js: "4.3.2"
# - node_js: "5.0"
- node_js: "6.0"
# - node_js: "node"
sudo: required
dist: trusty
#cache:
# directories:
# - node_modules
# - chrome-linux
## - lighthouse-extension/node_modules
# - bower_components
addons:
# firefox: '46.0'
# apt:
# sources:
# - google-chrome
# packages:
# - google-chrome-stable
sauce_connect: true
#node_js:
# - '6'
# - '5'
# - '4'
#before_install:
# - export CHROME_BIN=chromium-browser
# - export DISPLAY=:99.0
# - sh -e /etc/init.d/xvfb start
before_install:
- sudo apt-get install libnss3-tools expect -y
before_script:
#Setup appengine appserver?
# - mkdir -p vendors
# - wget https://storage.googleapis.com/appengine-sdks/featured/google_appengine_1.9.40.zip -nv
# - unzip -qd vendors google_appengine_1.9.40.zip
# - ./vendors/google_appengine/dev_appserver.py --skip_sdk_update_check --port=8090 . &
#Setup Lighthouse
- npm install -g lighthouse
- export DISPLAY=:99.0
- export LIGHTHOUSE_CHROMIUM_PATH="$(pwd)/chrome-linux/chrome"
- sh -e /etc/init.d/xvfb start
- npm explore -g lighthouse -- ./lighthouse-core/scripts/download-chrome.sh
- mv $(npm root -g)/lighthouse/chrome-linux .
- $LIGHTHOUSE_CHROMIUM_PATH --version
#Install dependencies
- npm install -g bower polymer-cli http-server pwmetrics
- bower install
# TEMP - FIX POLYMERFIRE
#- perl -i -pe 's/\_bootstrapApp\(app\, customSw\) \{/\_bootstrapApp\: function\(app\, customSw\) \{/g' bower_components/polymerfire/firebase-messaging.html
#- sed -i 's/_bootstrapApp/_bootstrapApp: function/g' bower_components/polymerfire/firebase-messaging.html
#Install WCT
- npm install -g web-component-tester
# - npm install -g selenium-webdriver #nodig wanneer je: run wct wilt draaien
#Setup SSL db
- mkdir -p $HOME/.pki/nssdb
- chmod a+x create_certutil_db.sh
- ./create_certutil_db.sh
#Add SSL cert to trusted
- certutil -d sql:$HOME/.pki/nssdb -A -t P -n 'localhost-cert' -i ssl/server.crt
script:
#Run 'stock' polymer tests
#- polymer test //Gets error
#Build polymer project
- polymer build
#Run HTTP server
- polymer serve build/bundled &
- sleep 5
#Lighthouse HTTP
- touch validate/log.json
- lighthouse --output=json http://localhost:8080/ --output-path=validate/log.json
- chmod a+x validate/checklog.js
- ./validate/checklog.js ./validate/log.json
#Run HTTPS server
- http-server build/bundled -p 4443 -S -C ssl/server.crt -K ssl/key.pem &
- sleep 5
#Lighthouse HTTPS
- touch validate/log-ssl.json
- lighthouse --output=json https://localhost:4443/ --output-path=validate/log-ssl.json
- chmod a+x validate/checklog.js
- ./validate/checklog.js ./validate/log-ssl.json
#Webcomponent test via Sauce lab
# - xvfb-run wct
- wct -s default
#PWMetrics
- pwmetrics https://localhost:4443/
notifications:
slack:
secure: ADt7xlh8E7bnq0PdCobSo5SRuYM56SxET+rlKZXcyGDExKCo9NSdgjAomuiJBm/ZpjnhrASO6msGjgKgmmGhmzF+H/PpgPQ/IifNIHYrJvdbflYvaj7165y7FYiLMSHAqdFFe33JKGZHpNkLKHUr3mtlIyqKhrvXpG8bhny5ObL0Aoo21OcWsNbsDWwGRu6yWVdX5sehbvskOWPALTXmL0d56LtujlprnmvI4Ae7QfDcAlVkTt+VliRtLtcH+f5VtSiHAnlrlhy1Idpjmq5AmDeEau9kovp2sxQ+RUmAw8P9QwkVclpEv5997t6zFzVJV+IraTgbFagJNEMWK+NFkZRsEHgk0P8yyNVadzGZtE8czfb/tUg5tuRUhJEDxmHJM83Pqr++QCaSR5B1Wk5fY+IhJ5Hlwzc+CurpNreiwOP+DffaKosCh9cmuMP9PJxKfmpvTnlzp9zGbp+BupJYakGRNMSZQD9UvRm350367gtOTm+d+rMfBWO4QCD1kcZLAwMd7OhEyVYNbma7euURzOjKO2iNCmdUh+hZvlVdItkjdP3Qa2PgAO6id3sZJkq45tlgEDrlgL5mr+LreHy54WMMCXohhp/NatFC7HO8bpX1WNrVRoz82c9FAklhsk1qoYL20KkW+CQIrPclagALD3NNog1K8D4Kajq/IvwvPdM=