From 38b00acb13770ce40ecdd69a2ae874c237eb5b2c Mon Sep 17 00:00:00 2001 From: johnlitvinov Date: Mon, 26 Aug 2024 22:53:41 +0200 Subject: [PATCH] wip --- .github/workflows/uitests.yaml | 92 +++++++++++++++++----------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/.github/workflows/uitests.yaml b/.github/workflows/uitests.yaml index 7676abf..ae2caba 100644 --- a/.github/workflows/uitests.yaml +++ b/.github/workflows/uitests.yaml @@ -58,7 +58,7 @@ jobs: path: 'SDK-Auto-Test' clean: true repository: 'appodeal/SDK-Auto-Test' - ref: 'aws' + ref: 'aws_ios' token: ${{ secrets.UITESTREPOACCESS }} - name: Set up JDK 11 @@ -72,52 +72,52 @@ jobs: with: name: AppodealSwiftDemo path: ./SDK-Auto-Test/ipa + + - name: prepare build + working-directory: ${{ github.workspace }}/SDK-Auto-Test + run: | + mvn clean + sleep 10 + mvn jar:jar + sleep 10 + mvn jar:test-jar + sleep 10 + mvn assembly:assembly -DskipTests -Ddescriptor=src/main/assembly/zip.xml + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 # -# - name: prepare build -# working-directory: ${{ github.workspace }}/SDK-Auto-Test -# run: | -# mvn clean -# sleep 10 -# mvn jar:jar -# sleep 10 -# mvn jar:test-jar -# sleep 10 -# mvn assembly:assembly -DskipTests -Ddescriptor=src/main/assembly/zip.xml -# -# - name: Configure AWS credentials -# uses: aws-actions/configure-aws-credentials@v4 -# with: -# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} -# aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} -# aws-region: us-west-2 -# -# - name: Upload APK to AWS Device Farm -# id: upload-apk -# run: | -# APP_UPLOAD_RESPONSE=$(aws devicefarm create-upload --project-arn arn:aws:devicefarm:us-west-2:381491970378:project:4c28c1e5-8344-4d34-919c-a1e9377d3b2f --name banner-debug.apk --type ANDROID_APP) -# APP_ARN=$(echo $APP_UPLOAD_RESPONSE | jq -r .upload.arn) -# echo "APP_ARN=$APP_ARN" >> $GITHUB_ENV -# APP_URL=$(echo $APP_UPLOAD_RESPONSE | jq -r .upload.url) -# curl -T ./SDK-Auto-Test/apk/banner-debug.apk "$APP_URL" -# # Wait until the upload is processed -# while [[ "$(aws devicefarm get-upload --arn $APP_ARN | jq -r '.upload.status')" != "SUCCEEDED" ]]; do -# echo "Waiting for APK upload to complete..." -# sleep 10 -# done -# -# - name: Upload Test Package to AWS Device Farm -# id: upload-tests -# run: | -# TEST_PACKAGE_UPLOAD_RESPONSE=$(aws devicefarm create-upload --project-arn arn:aws:devicefarm:us-west-2:381491970378:project:4c28c1e5-8344-4d34-919c-a1e9377d3b2f --name zip-with-dependencies.zip --type APPIUM_JAVA_TESTNG_TEST_PACKAGE) -# TEST_PACKAGE_ARN=$(echo $TEST_PACKAGE_UPLOAD_RESPONSE | jq -r .upload.arn) -# echo "TEST_PACKAGE_ARN=$TEST_PACKAGE_ARN" >> $GITHUB_ENV -# TEST_PACKAGE_URL=$(echo $TEST_PACKAGE_UPLOAD_RESPONSE | jq -r .upload.url) -# curl -T ./SDK-Auto-Test/target/zip-with-dependencies.zip $TEST_PACKAGE_URL -# # Wait until the upload is processed -# while [[ "$(aws devicefarm get-upload --arn $TEST_PACKAGE_ARN | jq -r '.upload.status')" != "SUCCEEDED" ]]; do -# echo "Waiting for Test Package upload to complete..." -# sleep 10 -# done + - name: Upload IPA to AWS Device Farm + id: upload-ipa + run: | + APP_UPLOAD_RESPONSE=$(aws devicefarm create-upload --project-arn arn:aws:devicefarm:us-west-2:381491970378:project:4c28c1e5-8344-4d34-919c-a1e9377d3b2f --name AppodealSwiftDemo.ipa --type IOS_APP) + APP_ARN=$(echo $APP_UPLOAD_RESPONSE | jq -r .upload.arn) + echo "APP_ARN=$APP_ARN" >> $GITHUB_ENV + APP_URL=$(echo $APP_UPLOAD_RESPONSE | jq -r .upload.url) + curl -T ./SDK-Auto-Test/ipa/AppodealSwiftDemo.ipa "$APP_URL" + # Wait until the upload is processed + while [[ "$(aws devicefarm get-upload --arn $APP_ARN | jq -r '.upload.status')" != "SUCCEEDED" ]]; do + echo "Waiting for APK upload to complete..." + sleep 10 + done + + - name: Upload Test Package to AWS Device Farm + id: upload-tests + run: | + TEST_PACKAGE_UPLOAD_RESPONSE=$(aws devicefarm create-upload --project-arn arn:aws:devicefarm:us-west-2:381491970378:project:4c28c1e5-8344-4d34-919c-a1e9377d3b2f --name zip-with-dependencies.zip --type APPIUM_JAVA_TESTNG_TEST_PACKAGE) + TEST_PACKAGE_ARN=$(echo $TEST_PACKAGE_UPLOAD_RESPONSE | jq -r .upload.arn) + echo "TEST_PACKAGE_ARN=$TEST_PACKAGE_ARN" >> $GITHUB_ENV + TEST_PACKAGE_URL=$(echo $TEST_PACKAGE_UPLOAD_RESPONSE | jq -r .upload.url) + curl -T ./SDK-Auto-Test/target/zip-with-dependencies.zip $TEST_PACKAGE_URL + # Wait until the upload is processed + while [[ "$(aws devicefarm get-upload --arn $TEST_PACKAGE_ARN | jq -r '.upload.status')" != "SUCCEEDED" ]]; do + echo "Waiting for Test Package upload to complete..." + sleep 10 + done # # - name: Schedule Device Farm Automated Test # id: run-test