forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (52 loc) · 1.32 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
language: objective-c
cache:
directories:
- node_modules
before_install:
- brew update
install:
- brew reinstall flow watchman xctool
- npm install
script:
- |
if [ "$TEST_TYPE" = objc ]
then
(npm start > packager.log 2>&1 &)
echo $! > packager.pid
xctool \
-project Examples/UIExplorer/UIExplorer.xcodeproj \
-scheme UIExplorer -sdk iphonesimulator8.1
test
pkill -9 -F packager.pid
cat packager.log
rm packager.log packager.pid
elif [ "$TEST_TYPE" = js ]
then
flow check && npm test
elif [ "$TEST_TYPE" = build_website ]
then
cd website
npm install
./setup.sh
if [ "$TRAVIS_PULL_REQUEST" = false ] && [ "$TRAVIS_BRANCH" = master ]; then
# Automatically publish the website
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
else
echo "Unknown test type: $TEST_TYPE"
exit 1
fi
env:
matrix:
- TEST_TYPE=objc
- TEST_TYPE=js
- TEST_TYPE=build_website
global:
- secure: "HlmG8M2DmBUSBh6KH1yVIe/8gR4iibg4WfcHq1x/xYQxGbvleq7NOo04V6eFHnl9cvZCu+PKH0841WLnGR7c4BBf47GVu/o16nXzggPumHKy++lDzxFPlJ1faMDfjg/5vjbAxRUe7D3y98hQSeGHH4tedc8LvTaFLVu7iiGqvjU="
branches:
only:
- master