Skip to content

Merge pull request #554 from dipjyotimetia/dependabot/gradle/com.micr… #973

Merge pull request #554 from dipjyotimetia/dependabot/gradle/com.micr…

Merge pull request #554 from dipjyotimetia/dependabot/gradle/com.micr… #973

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Upload app and set app location
id: app-upload
run: |
IPA_UPLOAD_RESPONSE=$(curl -u "$USERNAME:$ACCESS" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "url=https://github.com/saucelabs/sample-app-mobile/releases/download/2.7.1/iOS.RealDevice.SauceLabs.Mobile.Sample.app.2.7.1.ipa")
APK_UPLOAD_RESPONSE=$(curl -u "$USERNAME:$ACCESS" -X POST https://api-cloud.browserstack.com/app-automate/upload -F "url=https://github.com/saucelabs/sample-app-mobile/releases/download/2.7.1/Android.SauceLabs.Mobile.Sample.app.2.7.1.apk")
echo "::set-output name=IPA_URL::$(echo $IPA_UPLOAD_RESPONSE | jq -r '.app_url')"
echo "::set-output name=APK_URL::$(echo $APK_UPLOAD_RESPONSE | jq -r '.app_url')"
env:
USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
ACCESS: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
- name: Gradle Run Test
run: ./gradlew task e2e
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
IPA_URL: ${{steps.app-upload.outputs.IPA_URL}}
APK_URL: ${{steps.app-upload.outputs.APK_URL}}
- name: Generate Report
run: ./gradlew task allureReport
- uses: actions/upload-artifact@v4
with:
name: allure-report
path: build/reports/allure-report