mirror of
https://github.com/silkimen/cordova-plugin-advanced-http.git
synced 2026-01-31 00:00:03 +08:00
enable saucelabs testing for android platform
This commit is contained in:
@@ -32,10 +32,13 @@ install:
|
||||
- export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/build-tools/23.0.2
|
||||
|
||||
script:
|
||||
- travis_wait scripts/build-test-app.sh
|
||||
- scripts/upload-artifact.sh
|
||||
- npm run testjs
|
||||
- travis_wait scripts/build-test-app.sh --ios --emulator
|
||||
- scripts/upload-artifact.sh --ios
|
||||
- scripts/test-app.sh --ios --emulator
|
||||
- travis_wait scripts/build-test-app.sh --android --emulator
|
||||
- scripts/upload-artifact.sh --android
|
||||
- scripts/test-app.sh --android --emulator
|
||||
|
||||
after_success:
|
||||
|
||||
|
||||
@@ -1,16 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
PLATFORM=$([[ "${@#--android}" = "$@" ]] && echo "ios" || echo "android")
|
||||
ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/..
|
||||
TEMP=$ROOT/temp
|
||||
|
||||
rm -rf $TEMP/HttpDemo.app.zip
|
||||
pushd $TEMP/platforms/ios/build/emulator
|
||||
zip -r $TEMP/HttpDemo.app.zip ./HttpDemo.app
|
||||
popd
|
||||
if [ $PLATFORM = "android" ]; then
|
||||
curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \
|
||||
-X POST \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
https://saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/HttpDemo.apk?overwrite=true \
|
||||
--data-binary @$TEMP/platforms/android/build/outputs/apk/android-debug.apk
|
||||
else
|
||||
rm -rf $TEMP/HttpDemo.app.zip
|
||||
pushd $TEMP/platforms/ios/build/emulator
|
||||
zip -r $TEMP/HttpDemo.app.zip ./HttpDemo.app
|
||||
popd
|
||||
|
||||
curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \
|
||||
-X POST \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
https://saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/HttpDemo.app.zip?overwrite=true \
|
||||
--data-binary @$TEMP/HttpDemo.app.zip
|
||||
curl -u $SAUCE_USERNAME:$SAUCE_ACCESS_KEY \
|
||||
-X POST \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
https://saucelabs.com/rest/v1/storage/$SAUCE_USERNAME/HttpDemo.app.zip?overwrite=true \
|
||||
--data-binary @$TEMP/HttpDemo.app.zip
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user