forked from AhsanAyaz/ngx-device-detector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (33 loc) · 949 Bytes
/
.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
language: node_js
sudo: true
node_js:
- "8"
demo/dist: trusty
branches:
only:
- master
before_script:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- wget -N https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb -P ~/
- sudo dpkg -i --force-depends ~/google-chrome-stable_current_amd64.deb
- npm install -g yarn
script:
- npm run lint
- node_modules/.bin/karma start --single-run --no-fail-on-empty-test-suite
- cd demo
- yarn
- node_modules/.bin/ng test --watch false
- node_modules/.bin/webdriver-manager update
- ng build --base-href "https://koderlabs.github.io/ngx-device-detector/demo/" --prod --aot --output-hashing=all
- cd ..
- cp -R ./demo/dist ./docs/demo
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
local_dir: docs
on:
branch: master