-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from deepaktiwariyml/fix/workflow
Fix/workflow
- Loading branch information
Showing
9 changed files
with
144 additions
and
31 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | ||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
|
||
# This workflow uses actions that are not certified by GitHub. | ||
# They are provided by a third-party and are governed by | ||
# separate terms of service, privacy policy, and support | ||
# documentation. | ||
|
||
name: verify Android App Automation Workflow | ||
|
||
on: | ||
workflow_dispatch: | ||
jobs: | ||
job_id: | ||
|
||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '11' | ||
distribution: 'temurin' | ||
cache: maven | ||
- name: Get current date | ||
id: date | ||
uses: Kaven-Universe/github-action-current-date-time@v1 | ||
with: | ||
format: "YYYY-MM-DD" | ||
- name: BrowserStack Env Setup | ||
uses: 'browserstack/github-actions/setup-env@master' | ||
with: | ||
username: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
access-key: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
- name: Upload iOS App | ||
id: ios_app_upload | ||
uses: fjogeleit/http-request-action@v1 | ||
with: | ||
url: https://api-cloud.browserstack.com/app-automate/upload | ||
method: POST | ||
username: ${{ secrets.BROWSERSTACK_USERNAME }} | ||
password: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} | ||
data: '{ "custom_id": "SAMPLE_ANDROID_APP" }' | ||
files: '{ "file": "${{ github.workspace }}/src/main/resources/android/apps/wdio.apk" }' | ||
- name: test with Maven | ||
run: mvn clean test "-DreportTitle=Sample Android Automation Test Report" -DrunMode=cloud -Dplatform=android -DsuiteFile=testng.xml | ||
- name: Check Automation report was generated | ||
id: check_files | ||
uses: andstor/file-existence-action@v2 | ||
with: | ||
files: "reports/test-suite-report.html" | ||
- name: Upload test results | ||
if: always() | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: test_execution_results | ||
path: reports/ | ||
|
||
- name: send summary report email | ||
uses: dawidd6/action-send-mail@v3 | ||
if: always() | ||
with: | ||
server_address: smtp.gmail.com | ||
server_port: 465 | ||
username: ${{ secrets.EMAIL_USERNAME }} | ||
password: ${{ secrets.EMAIL_PASSWORD }} | ||
subject: 'sample Android Automation Test Report - ${{ steps.date.outputs.time }}' | ||
body: Build job of ${{github.repository}} completed successfully.Below is the Result summary. for Complete Details, Download the attached report. | ||
html_body: file://target/surefire-reports/emailable-report.html | ||
to: ${{ secrets.EMAIL_RECIPIENT_LIST }} | ||
cc: ${{ secrets.EMAIL_CC_LIST }} | ||
from: ${{ secrets.EMAIL_USERNAME }} | ||
attachments: reports/test-suite-report.html |
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
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
Binary file not shown.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
BS.USERNAME=ctqa2 | ||
BS.ACCESS_KEY=1Upj3Fh8x5HDf9haEWZ4 | ||
BS.APPIUM_VERSION=2.4.1 | ||
BS.PLATFORM_VERSION=12.0 | ||
BS.DEVICE_NAME=Samsung Galaxy S22 Ultra | ||
BS.APP=SAMPLE_ANDROID_APP |
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
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
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
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