Skip to content

Instrumentation tests #2837

Instrumentation tests

Instrumentation tests #2837

name: Instrumentation tests
on:
workflow_dispatch:
schedule:
# every 12 hours
- cron: '0 */12 * * *'
jobs:
# This should be updated to use the browserstack github actions when supported
browserstack-instrumentation-tests:
name: Browserstack Instrumentation tests
runs-on: ubuntu-latest
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/stripe_setup
- name: 'Build'
run: ./gradlew :paymentsheet-example:assembleDebugAndroidTest :paymentsheet-example:assembleDebug -PIS_NIGHTLY_BUILD=true -PIS_BROWSERSTACK_BUILD=true
- name: 'Install pip modules'
run: pip install requests_toolbelt requests
- name: 'Run BrowserStack tests'
timeout-minutes: 180
env:
BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }}
run: python scripts/browserstack.py --test --apk paymentsheet-example/build/outputs/apk/debug/paymentsheet-example-debug.apk --espresso paymentsheet-example/build/outputs/apk/androidTest/debug/paymentsheet-example-debug-androidTest.apk --is-nightly --num-retries 5
- name: Notify failure endpoint
id: notifyFailureEndpoint
if: failure()
run: |
./scripts/notify_failure_endpoint.rb \
${{ secrets.SDK_FAILURE_NOTIFICATION_ENDPOINT }} \
${{ secrets.SDK_FAILURE_NOTIFICATION_ENDPOINT_HMAC_KEY }} \
"https://github.com/stripe/stripe-android/actions/runs/${{ github.run_id }}" \
RUN_MOBILESDK