Skip to content

feat: use paykit fallback execution #1

feat: use paykit fallback execution

feat: use paykit fallback execution #1

Workflow file for this run

name: E2E Pubky Integration Tests
on:
push:
branches: [main, develop]
paths:
- 'app/src/main/java/to/bitkit/paykit/**'
- 'app/src/main/java/to/bitkit/ui/paykit/**'
- 'e2e/**'
- '.github/workflows/e2e-pubky.yml'
pull_request:
branches: [main, develop]
paths:
- 'app/src/main/java/to/bitkit/paykit/**'
- 'app/src/main/java/to/bitkit/ui/paykit/**'
- 'e2e/**'
- '.github/workflows/e2e-pubky.yml'
workflow_dispatch:
env:
JAVA_VERSION: '17'
ANDROID_API_LEVEL: 33
ANDROID_BUILD_TOOLS_VERSION: 33.0.2
ANDROID_TARGET: google_apis
jobs:
e2e-pubky:
name: Pubky Integration E2E Tests
runs-on: macos-latest
timeout-minutes: 60
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
gradle-home-cache-cleanup: true
- name: Install Maestro CLI
run: |
curl -Ls https://get.maestro.mobile.dev | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
- name: Build Bitkit APK
run: ./gradlew assembleDevDebug
- name: Checkout Pubky Ring
uses: actions/checkout@v4
with:
repository: synonymdev/pubky-ring
path: pubky-ring
token: ${{ secrets.GH_PAT_READ }}
- name: Setup Node.js for Ring
uses: actions/setup-node@v4
with:
node-version: '18'
- name: Build Pubky Ring APK
working-directory: pubky-ring
run: |
npm install
cd android
./gradlew assembleRelease
- name: AVD Cache
uses: actions/cache@v4
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ env.ANDROID_API_LEVEL }}-${{ env.ANDROID_TARGET }}
- name: Create AVD and run tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API_LEVEL }}
target: ${{ env.ANDROID_TARGET }}
arch: x86_64
profile: Nexus 6
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
disable-animations: true
script: |
# Wait for emulator to be ready
adb wait-for-device
adb shell input keyevent 82
# Install APKs
echo "Installing Bitkit APK..."
adb install -r app/build/outputs/apk/dev/debug/app-dev-debug.apk
echo "Installing Pubky Ring APK..."
adb install -r pubky-ring/android/app/build/outputs/apk/release/app-release.apk
# Inject test identities
echo "Injecting test identities..."
echo "${{ secrets.E2E_PKARR_PRIMARY }}" | base64 -d > /tmp/primary.pkarr
echo "${{ secrets.E2E_PKARR_SECONDARY }}" | base64 -d > /tmp/secondary.pkarr
adb push /tmp/primary.pkarr /sdcard/Download/test-primary.pkarr
adb push /tmp/secondary.pkarr /sdcard/Download/test-secondary.pkarr
# Verify files
adb shell ls -la /sdcard/Download/test-*.pkarr
# Run Maestro tests
echo "Running Maestro E2E tests..."
maestro test e2e/flows/ --format junit --output test-results/
- name: Upload Test Results
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-pubky-test-results
path: test-results/
retention-days: 30
- name: Upload Screenshots
uses: actions/upload-artifact@v4
if: always()
with:
name: e2e-pubky-screenshots
path: |
*.png
e2e/**/*.png
retention-days: 30
- name: Cleanup
if: always()
run: |
rm -f /tmp/primary.pkarr /tmp/secondary.pkarr
# ==============================================================================
# SECRETS REQUIRED:
# ==============================================================================
# E2E_PKARR_PRIMARY - Base64 encoded content of android-ai-tester-*.pkarr
# E2E_PKARR_SECONDARY - Base64 encoded content of ios-ai-tester-*.pkarr
# GH_PAT_READ - GitHub PAT with read access to synonymdev/pubky-ring
#
# To create the base64 secrets:
# base64 -i credentials/android-ai-tester-backup-2026-01-01_12-18-17.pkarr
# base64 -i credentials/ios-ai-tester-backup-2026-01-01_12-16-19.pkarr
# ==============================================================================