forked from facebookarchive/draft-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (60 loc) · 2.07 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
language: node_js
node_js:
- 6
sudo: false
cache:
directories:
- node_modules
env:
matrix:
- TEST_TYPE=build
- TEST_TYPE=test
- TEST_TYPE=flow
- TEST_TYPE=lint
- TEST_TYPE=build_website
global:
- CXX=g++-4.8
# $GITHUB_TOKEN
- secure: "JOaZao55VK0+3Uf2AoPo5qOXBKEUnqwbwfHsPq5746+7zzr4WpSOleYWLCOm3cl/pMuw7MEa8cQ8MzBktvUyuqbYEl6tslqNE+IINXPlrLbZJGbz5US/doNwv6nWk679op4XJin8ZjJy3AsoP8+qRJCzGRepjiNQTT4Yq72lWEEv1ea5RN5CQNobTBJfyJ47+XK+A8Zqea8mV152LO2h0/q96Ny1YQpcG/uQj8KGjd/Gi9OEifheKYZV5YzamWF3zouchVC3uJZTfAs7zOuiz/23ej2HwUwCfE7ZlcM0EvEJ4oEKPhO7ZUt0tLw3O/xIzhIJMngyfWee+jp47SAPioyfW/mzX8S+2ma8dstFsgG7XbVpIwk4906tJFIcOLxrAocXqcSAOC+bS01rFbFzDVdh3czWF8iaSglZh6SWfgn0aAEoNSxZZJffVsxciAG13FlG0bz0MgNqZuNflwE2aN14k2rWYtgz/rpjnMQNE0p98JMuxxC4ezWQ7FwNe+k3OLqSfSiQffeOvLiOqdMQlH5KCLg/7ODtI6vvoxA3IQvYM8s0pZ7OY581aUhaBTZ/GiLGHz8fHuA4URUGNFixEyGvMr6Q1zhNvGmyHOW+vyzx4JOdM6VmW85+mY0M+qJ7TfoUJRM1A3WhvW43X2ghwou4YM35Xj2I7g4DRPEk+XE="
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
before_install:
- npm install -g npm@latest-2
- npm --version
install:
# Remove any unncessary packages. Probably unnecessary but potentially helpful
- npm prune
# Update runs install, but will also pull in the latest updates so the cache
# doesn't get stale
- npm update
before_script:
# For additional debugging when Travis inevitably gets into a bad state.
- npm ls --depth=0
script:
- |
if [ "$TEST_TYPE" != build_website ]
then
npm run $TEST_TYPE
else
set -e
./node_modules/.bin/gulp
cd website
npm install
./setup.sh
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
# Automatically publish the website
git config --global user.name "Travis CI"
git config --global user.email "[email protected]"
echo "machine github.com login reactjs-bot password $GITHUB_TOKEN" >~/.netrc
./publish.sh
else
# Make sure the website builds without error
node server/generate.js
fi
fi
notifications:
webhooks: https://code.facebook.com/travis/webhook/