forked from all-the-hubbub/hubbub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (56 loc) · 1.47 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
sudo: required # because we're using apt
dist: trusty
language: node_js
node_js:
- 6.9.1
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
cache: yarn
addons:
apt:
sources:
- sourceline: 'deb https://dl.yarnpkg.com/debian/ stable main'
key_url: 'https://dl.yarnpkg.com/debian/pubkey.gpg'
packages:
- yarn
before_install:
- export CHROME_BIN=/usr/bin/google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation
- wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
- sudo dpkg -i google-chrome*.deb
- rm google-chrome*.deb
install:
- (cd webapp; yarn)
- (cd functions; yarn)
env:
master:
web: prod
script:
- export WEB_ENV=dev
- if [ "$TRAVIS_BRANCH" = "staging" ]; then export WEB_ENV=staging; fi
- if [ "$TRAVIS_BRANCH" = "master" ]; then export WEB_ENV=prod; fi
- echo "Building with environment=$WEB_ENV"
- (cd webapp/src/environments; cp environment.staging.ts environment.ts)
- (cd webapp; ng test --watch false && ng build --environment=$WEB_ENV)
- (cd functions; yarn test)
deploy:
- provider: firebase
skip_cleanup: true
token:
secure: "$FIREBASE_TOKEN"
project: hubbub-159904
on:
branch: master
- provider: firebase
skip_cleanup: true
token:
secure: "$FIREBASE_STAGING_TOKEN"
project: hubbub-staging
on:
branch: staging