-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
37 lines (29 loc) · 1.04 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
#.travis.yml
dist: trusty
sudo: required
cache:
directories:
- node_modules
language: node_js
addons:
chrome: stable
addons:
apt:
packages:
- libnss3
node_js:
- "8.9.1"
env:
- TEST_SUITE=unit
- TEST_SUITE=e2e
before_script:
- if [ "$TEST_SUITE" == "e2e" ]; then export DISPLAY=:99.0; fi
- if [ "$TEST_SUITE" == "e2e" ]; then eval "sh -e /etc/init.d/xvfb start &"; fi
- if [ "$TEST_SUITE" == "e2e" ]; then sleep 3; fi # let xvfb start up
- if [ "$TEST_SUITE" == "e2e" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ "$TRAVIS_BRANCH" == "master" ]; then npm install -g firebase-tools; fi
- npm install -g @angular/[email protected]
script:
- if [ "$TEST_SUITE" == "unit" ]; then ng test; fi
- if [ "$TEST_SUITE" == "e2e" ]; then ng e2e --environment=ci --target=production; fi
- if [ "$TEST_SUITE" == "e2e" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then sh deploy/staging.sh; fi
- if [ "$TEST_SUITE" == "e2e" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then sh deploy/prod.sh; fi