Skip to content

Commit

Permalink
Update appium-automation.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nsingh-branch committed May 8, 2024
1 parent aec0a2f commit bd0eeca
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion .github/workflows/appium-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@ jobs:
uses: actions/checkout@v3
with:
path: sdk
ref: ${{ github.ref }}
# point to automation master branch by default
- name: Checkout Master SDK repo with testbed app for Reinstallation tests
uses: actions/checkout@v3
if: ${{ !( github.ref == 'refs/heads/master')}}
with:
path: previousVersionSDK
ref: Test-Automation-Improvements
- name: Checkout qa automation
uses: actions/checkout@v3
with:
Expand All @@ -36,16 +43,54 @@ jobs:
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
# to reduce complexity, testbed app uses sdk as a project reference
- name: Build testbed app
- name: Decode Keystore
env:
ENCODED_STRING: ${{ secrets.KEYSTORE }}
run: |
cd sdk
echo $ENCODED_STRING | base64 -d > ./Branch-SDK-Automation-TestBed/automationSigningKeys.jks
cp ./Branch-SDK-Automation-TestBed/automationSigningKeys.jks ../previousVersionSDK/Branch-SDK-Automation-TestBed/
ls -la
ls -la ./Branch-SDK-Automation-TestBed/
- name: Build testbed app and Link Click Test App
run: |
cd sdk
ls -la
ls -la ./Branch-SDK-Automation-TestBed/
./gradlew Branch-SDK-Automation-TestBed:assembleDebug
./gradlew branchsdk-link-clicktest:assembleDebug
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Build Master testbed app for Reinstallation tests
if: ${{ !( github.ref == 'refs/heads/master')}}
run: |
cd previousVersionSDK
./gradlew Branch-SDK-Automation-TestBed:assembleDebug
env:
SIGNING_KEY_ALIAS: ${{ secrets.SIGNING_KEY_ALIAS }}
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }}
SIGNING_STORE_PASSWORD: ${{ secrets.SIGNING_STORE_PASSWORD }}
- name: Upload APK to BrowserStack
run: |
response=$(curl -X POST https://api-cloud.browserstack.com/app-automate/upload -u "${{ secrets.BROWSER_STACK_USER }}:${{ secrets.BROWSER_STACK_KEY }}" -F "file=@sdk/Branch-SDK-Automation-TestBed/build/outputs/apk/debug/Branch-SDK-Automation-TestBed-debug.apk")
parsed=$(echo $response | jq ".app_url")
echo "::add-mask::$parsed"
echo "BrowserStackAndroidNewBuildKey=$parsed" >> "$GITHUB_ENV"
- name: Upload Link Click Test App APK to BrowserStack
run: |
response=$(curl -X POST https://api-cloud.browserstack.com/app-automate/upload -u "${{ secrets.BROWSER_STACK_USER }}:${{ secrets.BROWSER_STACK_KEY }}" -F "file=@sdk/branchsdk-link-clicktest/build/outputs/apk/debug/branchsdk-link-clicktest-debug.apk")
parsed=$(echo $response | jq ".app_url")
echo "::add-mask::$parsed"
echo "BrowserStackLinkClickAppURL=$parsed" >> "$GITHUB_ENV"
- name: Upload APK from Master branch to BrowserStack for Reinstallation tests
if: ${{ !( github.ref == 'refs/heads/master')}}
run: |
response=$(curl -X POST https://api-cloud.browserstack.com/app-automate/upload -u "${{ secrets.BROWSER_STACK_USER }}:${{ secrets.BROWSER_STACK_KEY }}" -F "file=@previousVersionSDK/Branch-SDK-Automation-TestBed/build/outputs/apk/debug/Branch-SDK-Automation-TestBed-debug.apk")
parsed=$(echo $response | jq ".app_url")
echo "::add-mask::$parsed"
echo "BrowserStackAndroidOldBuildKey=$parsed" >> "$GITHUB_ENV"
# automation is compatible with java 11
- name: Setup java for automation
uses: actions/setup-java@v3
Expand All @@ -56,3 +101,9 @@ jobs:
run: |
cd qa
mvn clean test -DsuiteXMLFile=testng.xml -e -DInputFormat="json" -DInputFilePath="TestSelection_BrowserStack_Android.json" -DUploadNewBuild="Yes"
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
qa/Results

0 comments on commit bd0eeca

Please sign in to comment.