Build of 7a3f7987f7fc623a5daad4af0fc756989006558b #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Smoke tests on SamsungGalaxyS22Ultra_12 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Upload to browserstack and trigger tests | |
run: | | |
APP_UPLOAD_RESPONSE=$(curl -u "${{ secrets.BROWSERSTACK_USERNAME }}:${{ secrets.BROWSERSTACK_ACCESSKEY }}" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "file=@$GITHUB_WORKSPACE/$(find . -type f -name "palace-debug.apk")") | |
APP_ID=$(echo $APP_UPLOAD_RESPONSE | jq -r ".app_url") | |
BUILD_NAME=$(find . -type f -name "palace-debug.apk" -execdir basename {} .apk \;) | |
if [ $APP_ID != null ]; then | |
echo "Apk uploaded to BrowserStack with app id : $APP_ID"; | |
#echo "export BROWSERSTACK_APP_ID=$APP_ID" >> $BASH_ENV; | |
export BROWSERSTACK_APP_ID=$APP_ID | |
#source $BASH_ENV; | |
echo "Setting value of BROWSERSTACK_APP_ID in environment variables to $APP_ID"; | |
else | |
UPLOAD_ERROR_MESSAGE=$(echo $APP_UPLOAD_RESPONSE | jq -r ".error") | |
echo "App upload failed, reason : ",$UPLOAD_ERROR_MESSAGE | |
exit 1; | |
fi | |
echo "Triggering autotests" | |
curl -X POST -H "Accept:application/vnd.github.v3+json" https://api.github.com/repos/ThePalaceProject/mobile-integration-tests-new/actions/workflows/maven.yml/dispatches -d '{"ref":"main", "inputs":{"test_tag":"@smoke","bs_app_link":"'"$APP_ID"'","device_name_and_version":"SamsungGalaxyS22Ultra_12","platform_name":"android","build_name":"'"$BUILD_NAME"'"}}' -H "Authorization: token ${{secrets.PERSONAL_TOKEN}}" |