forked from NUS-ALSET/achievements
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
42 lines (36 loc) · 863 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
39
40
41
42
language: node_js
node_js:
- "10"
branches:
only:
- master
before_install:
- df -h
- yarn cache clean
- npm cache clear --force
- npm config set //registry.npmjs.org/:_authToken $NPM_API_KEY
install:
- yarn install
script:
- npm run-script test
- npm run-script build
after_success:
- echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST TRAVIS_BRANCH=$TRAVIS_BRANCH"
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
echo "deploy for upstream master merge";
cd ./functions;
pwd;
npm install -f;
npm install -g firebase-tools;
bash ../scripts/firebase-deploy.sh;
if [ "$?" != 0 ]; then
echo "ERROR with deployment";
return 1;
else
echo "======deployment done======";
fi
else
echo "Pull Request only build and test";
bash ./scripts/firebase-deploy.sh --dry-run
exit;
fi