-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrunAllTests
executable file
·43 lines (35 loc) · 848 Bytes
/
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
#!/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
source "$HOME/.rvm/scripts/rvm"
elif [[ -s "/usr/local/rvm/scripts/rvm" ]] ; then
# Then try to load from a root install
source "/usr/local/rvm/scripts/rvm"
else
echo "RVM not detected. Using local Ruby environment."
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
bundle exec fastlane android test
bundle exec fastlane ios test
if [[ "$HAVE_YARN" = 1 ]] ; then
yarn lint
yarn test
else
npm run lint
npm test
fi
exit 0