Skip to content

Samsung Galaxy S22 Ultra 12 Palace #78

Samsung Galaxy S22 Ultra 12 Palace

Samsung Galaxy S22 Ultra 12 Palace #78

name: Test on SamsungGalaxyS22Ultra_12 in Palace
on:
schedule:
- cron: '30 20 * * 2'
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":"@tier2","bs_app_link":"'"$APP_ID"'","device_name_and_version":"SamsungGalaxyS22Ultra_12","platform_name":"android","build_name":"'"$BUILD_NAME"'"}}' -H "Authorization: token ${{secrets.PERSONAL_TOKEN}}"