mirror of
https://github.com/mosip/inji-wallet.git
synced 2026-01-09 05:27:57 -05:00
[DSD-4749] updated ui-automation worflow (#1358)
* [DSD-4749] Signed-off-by: bhumi46 <thisisbn46@gmail.com> * [DSD-4749] Signed-off-by: bhumi46 <thisisbn46@gmail.com> * [DSD-4749] Signed-off-by: bhumi46 <thisisbn46@gmail.com> --------- Signed-off-by: bhumi46 <thisisbn46@gmail.com>
This commit is contained in:
105
.github/workflows/ui-automation.yml
vendored
105
.github/workflows/ui-automation.yml
vendored
@@ -5,27 +5,24 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
runName:
|
||||
description: 'Name the run for Actions & DeviceFarm'
|
||||
required: true
|
||||
description: 'Name the run for Actions'
|
||||
default: 'Ex: Sanity/Regression[ENV]'
|
||||
type: string
|
||||
buildFor:
|
||||
description: 'Trigger test case run for'
|
||||
required: true
|
||||
default: 'Both[Android and IOS]'
|
||||
type: choice
|
||||
options:
|
||||
- Both[Android and IOS]
|
||||
- Android
|
||||
- IOS
|
||||
testType:
|
||||
description: 'Test type Sanity/Regression'
|
||||
required: true
|
||||
default: 'sanity'
|
||||
default: 'Sanity'
|
||||
type: choice
|
||||
options:
|
||||
- sanity
|
||||
- regression
|
||||
- Sanity
|
||||
- Regression
|
||||
backendServiceUrl:
|
||||
description: 'Mimoto and Esignet backend service URL'
|
||||
required: true
|
||||
@@ -34,7 +31,7 @@ on:
|
||||
|
||||
jobs:
|
||||
android-ui-automation:
|
||||
if: ${{ github.event.inputs.buildFor == 'Both[Android and IOS]' || github.event.inputs.buildFor == 'Android'}}
|
||||
if: ${{ github.event.inputs.buildFor == 'Android' }}
|
||||
name: Trigger android run
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -75,45 +72,31 @@ jobs:
|
||||
CREDENTIAL_REGISTRY_EDIT: 'false'
|
||||
RELEASE_KEYSTORE_ALIAS: 'androidreleasekey'
|
||||
RELEASE_KEYSTORE_PASSWORD: "${{ secrets.INJI_ANDROID_RELEASE_STOREPASS }}"
|
||||
|
||||
- name: Configure AWS CLI
|
||||
run: |
|
||||
aws configure set aws_access_key_id ${{ secrets.AWS_DEVICE_FARM_ACCESS_KEY }}
|
||||
aws configure set aws_secret_access_key ${{ secrets.AWS_DEVICE_FARM_SECRET_KEY }}
|
||||
aws configure set region us-west-2
|
||||
|
||||
- name: Android - Automation
|
||||
id: android-run
|
||||
run: |
|
||||
cd injitest/scripts/ui_automation
|
||||
./automation_trigger.sh "Android" "$RUN_NAME-Android" "$TEST_TYPE"
|
||||
env:
|
||||
RUN_NAME: ${{ github.event.inputs.runName }}
|
||||
TEST_TYPE: ${{ github.event.inputs.testType }}
|
||||
|
||||
- name: Download Android Artifacts
|
||||
run: |
|
||||
cd injitest/scripts/ui_automation
|
||||
./download_artifacts.sh "$RUN_ARN" "Android"
|
||||
|
||||
- name: Upload Artifact to Actions
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: Android-Artifacts
|
||||
path: injitest/scripts/ui_automation/artifacts/android_artifacts/
|
||||
name: residentapp
|
||||
path: android/app/build/outputs/apk/residentapp/release/Inji_universal.apk
|
||||
retention-days: 10
|
||||
|
||||
# - name: Update slack channel
|
||||
# if: always()
|
||||
# uses: 8398a7/action-slack@v3
|
||||
# with:
|
||||
# status: ${{ job.status }}
|
||||
# fields: repo,message,author,commit,workflow,job
|
||||
# env:
|
||||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}
|
||||
|
||||
- name: Run UI Automation Tests on BrowserStack
|
||||
run: |
|
||||
chmod +x injitest/automation_trigger.sh
|
||||
./injitest/automation_trigger.sh "$BROWSERSTACK_USERNAME" "$BROWSERSTACK_ACCESS_KEY" "$TEST_TYPE" "$PLATFORM_NAME"
|
||||
env:
|
||||
PLATFORM_NAME: ${{ github.event.inputs.buildFor }}
|
||||
TEST_TYPE: ${{ github.event.inputs.testType }}
|
||||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
- name: Save test reports
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success() || failure()
|
||||
with:
|
||||
name: test-reports
|
||||
path: injitest/target/surefire-reports
|
||||
|
||||
ios-ui-automation:
|
||||
if: ${{ github.event.inputs.buildFor == 'Both[Android and IOS]' || github.event.inputs.buildFor == 'IOS'}}
|
||||
if: ${{ github.event.inputs.buildFor == 'IOS' }}
|
||||
name: Trigger ios run
|
||||
runs-on: macos-13
|
||||
|
||||
@@ -154,37 +137,19 @@ jobs:
|
||||
APPLE_KEY_CONTENT: '${{ secrets.APPLE_KEY_CONTENT }}'
|
||||
MATCH_PASSWORD: '${{ secrets.INJI_IOS_MATCH_PASSWORD }}'
|
||||
|
||||
- name: Configure AWS CLI
|
||||
run: |
|
||||
aws configure set aws_access_key_id ${{ secrets.AWS_DEVICE_FARM_ACCESS_KEY }}
|
||||
aws configure set aws_secret_access_key ${{ secrets.AWS_DEVICE_FARM_SECRET_KEY }}
|
||||
aws configure set region us-west-2
|
||||
|
||||
- name: IOS - Automation
|
||||
run: |
|
||||
cd injitest/scripts/ui_automation
|
||||
./automation_trigger.sh "IOS" "$RUN_NAME-IOS" "$TEST_TYPE"
|
||||
env:
|
||||
RUN_NAME: ${{ github.event.inputs.runName }}
|
||||
TEST_TYPE: ${{ github.event.inputs.testType }}
|
||||
|
||||
- name: Download IOS Artifacts
|
||||
run: |
|
||||
cd injitest/scripts/ui_automation
|
||||
./download_artifacts.sh "$RUN_ARN" "IOS"
|
||||
|
||||
- name: Upload Artifact to Actions
|
||||
uses: actions/upload-artifact@v3.1.1
|
||||
with:
|
||||
name: IOS-Artifacts
|
||||
path: injitest/scripts/ui_automation/artifacts/ios_artifacts/
|
||||
name: residentapp
|
||||
path: ios/fastlane/Inji_artifacts/Inji.ipa
|
||||
retention-days: 10
|
||||
|
||||
# - name: Update slack channel
|
||||
# if: always()
|
||||
# uses: 8398a7/action-slack@v3
|
||||
# with:
|
||||
# status: ${{ job.status }}
|
||||
# fields: repo,message,author,commit,workflow,job
|
||||
# env:
|
||||
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}
|
||||
- name: Run UI Automation Tests on BrowserStack
|
||||
run: |
|
||||
chmod +x injitest/automation_trigger.sh
|
||||
./injitest/automation_trigger.sh "$BROWSERSTACK_USERNAME" "$BROWSERSTACK_ACCESS_KEY" "$TEST_TYPE" "$PLATFORM_NAME"
|
||||
env:
|
||||
PLATFORM_NAME: ${{ github.event.inputs.buildFor }}
|
||||
TEST_TYPE: ${{ github.event.inputs.testType }}
|
||||
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
|
||||
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
|
||||
|
||||
Reference in New Issue
Block a user