forked from facebookarchive/draft-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (57 loc) · 2.14 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
language: node_js
node_js:
- 8
- 10
sudo: false
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:
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.3.2
- export PATH=$HOME/.yarn/bin:$PATH
cache:
yarn: true
before_script:
# For additional debugging when Travis inevitably gets into a bad state.
- yarn list --depth=0
script:
- |
if [ "$TEST_TYPE" != build_website ]
then
yarn run $TEST_TYPE
else
set -e
./node_modules/.bin/gulp
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
cd website && yarn install && GIT_USER=reactjs-bot yarn deploy
else
# Make sure the website builds without error
cd website && yarn install && yarn build
fi
fi
notifications:
email:
recipients:
on_success: change # send a notification when the build status changes
on_failure: always # always send a notification
webhooks: https://code.facebook.com/travis/webhook/