Google Pixel 7 Pro 13 Lyrasis #55
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: Google Pixel 7 Pro 13 Lyrasis | |
on: | |
schedule: | |
- cron: '30 21 * * 3' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- 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":"@tier1","bs_app_link":"'"$APP_ID"'","device_name_and_version":"GooglePixel7Pro_13","platform_name":"android","build_name":"'"$BUILD_NAME"'"}}' -H "Authorization: token ${{secrets.PERSONAL_TOKEN}}" |