-
Notifications
You must be signed in to change notification settings - Fork 0
/
runAllTests
executable file
·52 lines (43 loc) · 1 KB
/
runAllTests
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
#!/bin/bash
if [[ "`uname -s`" != "Darwin" ]] ; then
echo "Error: macOS required"
exit -1
fi
# https://rvm.io/workflow/scripting
# Load RVM into a shell session *as a function*
if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then
# First try to load from a user install
HAVE_RVM=1
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
HAVE_RVM=1
source "/usr/local/rvm/scripts/rvm"
else
echo "RVM not detected. Using local Ruby environment."
fi
if [[ "$HAVE_RVM" = 1 ]]; then
rvm use
fi
PATH=${PATH}:/usr/local/bin
if [[ -s "`which yarn`" ]] ; then
HAVE_YARN=1
yarn
else
echo "yarn not detected. Using npm install."
npm install
fi
bundle check || bundle install
# Still having issues after update to RN 0.60
# bundle exec fastlane android test
bundle exec fastlane ios test
if [[ "$HAVE_YARN" = 1 ]] ; then
yarn lint
# pending update to jest
# yarn test
else
npm run lint
# pending update to jest
# npm test
fi
exit 0