-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuddybuild_postbuild.sh
47 lines (34 loc) · 1.04 KB
/
buddybuild_postbuild.sh
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
#!/usr/bin/env bash
cd /Users/buddybuild/workspace
echo '=== FOLDER LISTING POST BUILD'
ls -1
echo '=== SEE WHAT IS IN WWW, SHOULD HAVE STUFF!'
cd www
ls -1
echo '=== SEE IF PLATFORMS IS PROPERLY STUFFED'
cd platforms/android/assets
ls -1
cd www
ls -1
echo '=== Navigate to tests folder'
cd /Users/buddybuild/workspace/YOUR_TEST_FOLDER
echo '=== Install cucumber'
echo password | sudo -S gem install cucumber
echo password | sudo -S gem install rake
echo '=== Install appium 1.4.16'
npm install -g [email protected]
echo '=== Install selenium-webdriver'
npm install wd
echo '=== Authorize simulator access'
echo password | sudo -S authorize_ios
echo '=== First start appium server, then start your cucumber tests, if one test has failed show exit 1 and mark build as failed'
nohup appium --native-instruments-lib -lt 999999 &
sleep 15 && bundle exec rake
status=$?
pkill -f appium
if [ $status -ne 0 ]; then
echo TESTS FAILED
echo '=== Upload results to s3'
aws s3 sync ./results s3://YOUR_BUCKET_NAME/AppiumResults/$BUDDYBUILD_BUILD_NUMBER/
exit 1
fi