Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4f63f1a
chore: working on maestro e2e actions
ignaciosantise Jun 10, 2025
ea0e954
chore: changed format of action
ignaciosantise Jun 10, 2025
848a640
chore: action improvements
ignaciosantise Jun 10, 2025
662e318
chore: actions improvements
ignaciosantise Jun 10, 2025
ae7301c
chore: rename apks in e2e action
ignaciosantise Jun 10, 2025
ad74164
chore: actions improvements
ignaciosantise Jun 10, 2025
14b711c
chore: actions improvements
ignaciosantise Jun 10, 2025
eee6327
chore: action update
ignaciosantise Jun 11, 2025
762a101
chore: record video on connect reject
ignaciosantise Jun 11, 2025
d079ba6
chore: actions improvements
ignaciosantise Jun 11, 2025
e369b5e
chore: added test ids to maestro flows
ignaciosantise Jun 11, 2025
c966f13
chore: bump appkit to 1.2.5
ignaciosantise Jun 11, 2025
c36d46a
chore: changed android device
ignaciosantise Jun 11, 2025
190a478
chore: added valtio resolution
ignaciosantise Jun 11, 2025
c0aa706
chore: added scroll in test
ignaciosantise Jun 11, 2025
6a6955d
chore: changed android api
ignaciosantise Jun 11, 2025
90e56ee
chore: changed android api
ignaciosantise Jun 11, 2025
063801d
chore: actions improvements
ignaciosantise Jun 12, 2025
c19c2c2
chore: actions improvements
ignaciosantise Jun 12, 2025
f0d0011
chore: run all maestro tests + save crashlog at the end
ignaciosantise Jun 12, 2025
b81551f
chore: disabled sentry upload in test action
ignaciosantise Jun 12, 2025
897cefe
chore: use debug build for dapp to improve building times
ignaciosantise Jun 12, 2025
e84674c
Revert "chore: use debug build for dapp to improve building times"
ignaciosantise Jun 12, 2025
fa81145
chore: actions improvements
ignaciosantise Jun 12, 2025
d164358
chore: working on ios e2e script
ignaciosantise Jun 12, 2025
5d4767c
chore: action ios improvements
ignaciosantise Jun 12, 2025
d4a59af
Revert "chore: action ios improvements"
ignaciosantise Jun 13, 2025
397c4ba
chore: changed build path
ignaciosantise Jun 13, 2025
e6d2a4b
chore: removed pod cache condition
ignaciosantise Jun 13, 2025
aac77c4
chore: added config param on ios build command
ignaciosantise Jun 13, 2025
46769e5
chore: upload artifact correctly
ignaciosantise Jun 13, 2025
25b4997
chore: changed artifact folder
ignaciosantise Jun 13, 2025
7370298
chore: changed artifact filename
ignaciosantise Jun 13, 2025
3635591
chore: updated unzip path
ignaciosantise Jun 13, 2025
189ccc5
chore: removed list apps
ignaciosantise Jun 13, 2025
37c9af1
chore: remove simulator boot waitig
ignaciosantise Jun 13, 2025
2ce6ed7
chore: added ios condition to open wallet if requested
ignaciosantise Jun 13, 2025
54775ec
chore: turn off linkmode
ignaciosantise Jun 13, 2025
2e6f3cd
chore: add web tests
ignaciosantise Jun 17, 2025
6c34832
chore: native to web wallet button test in different platforms
ignaciosantise Jun 18, 2025
8aa15a9
chore: disabled web tests
ignaciosantise Jun 18, 2025
3135f69
Merge branch 'main' into chore/maestro-ci
ignaciosantise Jun 18, 2025
8844509
chore: action improvements
ignaciosantise Jun 18, 2025
9962129
chore: updated deps
ignaciosantise Oct 7, 2025
e997259
chore: improve E2E workflows - path filters, signing disable, cleanup
ignaciosantise Mar 27, 2026
61e8e7c
Merge remote-tracking branch 'origin/main' into chore/maestro-ci
ignaciosantise Mar 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions .github/actions/ci-setup-android-files/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: 'Setup Android Files'
description: 'Setup required files for building an Android project'

inputs:
root-path:
description: 'Path of the react-native project'
required: true
google-services-file:
description: 'Google Services Json file content, base64 encoded'
required: false
secrets-file:
description: 'Secrets properties file content'
required: true
keystore:
description: 'Keystore file content, base64 encoded'
required: true
keystore-name:
description: 'Keystore file name'
required: true
sentry-file:
description: 'Sentry file content'
required: true
project-id:
description: 'Reown Cloud ID'
required: true
relay-url:
description: 'Relay URL'
required: true
sentry-dsn:
description: 'Sentry DSN'
required: true
release-type:
description: 'Release type of the project (debug/internal/production)'
default: 'debug'

runs:
using: "composite"
steps:
- name: Create Google Services Json File
if: ${{ inputs.google-services-file != '' }}
shell: bash
run: echo "${{ inputs.google-services-file }}" | base64 --decode > ${{ inputs.root-path }}/android/app/google-services.json

- name: Create secrets.properties File
shell: bash
run: echo "${{ inputs.secrets-file }}" > ${{ inputs.root-path }}/android/secrets.properties

- name: Decode Keystore
shell: bash
run: echo "${{ inputs.keystore }}" | base64 --decode > ${{ inputs.root-path }}/android/app/${{ inputs.keystore-name }}.keystore

- name: Create Sentry File
shell: bash
run: echo "${{ inputs.sentry-file }}" > ${{ inputs.root-path }}/android/sentry.properties

- name: Create Env File
shell: bash
run: echo -e "ENV_PROJECT_ID=${{ inputs.project-id }}\nENV_RELAY_URL=${{ inputs.relay-url }}\nENV_SENTRY_DSN=${{ inputs.sentry-dsn }}\nENV_SENTRY_TAG=${{ inputs.release-type }}" >> ${{ inputs.root-path }}/.env.${{ inputs.release-type }}
41 changes: 41 additions & 0 deletions .github/actions/ci-setup-ios-files/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 'Setup iOS Files'
description: 'Setup required files for building an iOS project'

inputs:
root-path:
description: 'Path of the react-native project'
required: true
google-services-file:
description: 'Google Services Plist file content, base64 encoded'
required: false
sentry-file:
description: 'Sentry file content'
required: true
project-id:
description: 'WalletConnect Cloud ID'
required: true
relay-url:
description: 'WalletConnect Relay URL'
required: false
sentry-dsn:
description: 'Sentry DSN'
required: true
release-type:
description: 'Release type of the project (debug/internal/production)'
default: 'debug'

runs:
using: "composite"
steps:
- name: Create .env file
shell: bash
run: echo -e "ENV_PROJECT_ID=${{ inputs.project-id }}\nENV_RELAY_URL=${{ inputs.relay-url }}\nENV_SENTRY_DSN=${{ inputs.sentry-dsn }}\nENV_SENTRY_TAG=${{ inputs.release-type }}" >> ${{ inputs.root-path }}/.env.${{ inputs.release-type }}

- name: Create sentry.properties file
shell: bash
run: echo "${{ inputs.sentry-file }}" > ${{ inputs.root-path }}/ios/sentry.properties

- name: Create GoogleService-Info.plist file
if: ${{ inputs.google-services-file != '' }}
shell: bash
run: echo "${{ inputs.google-services-file }}" | base64 --decode > ${{ inputs.root-path }}/ios/GoogleService-Info.plist
248 changes: 244 additions & 4 deletions .github/workflows/ci_e2e_tests_android.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,251 @@ permissions:

on:
workflow_dispatch:
pull_request:
paths:
- 'wallets/rn_cli_wallet/**'
- 'dapps/W3MWagmi/**'
- '.maestro/**'
- '.github/workflows/ci_e2e_tests_android.yaml'
- '.github/actions/ci-setup/**'
- '.github/actions/ci-setup-android-files/**'

permissions:
contents: read

jobs:
placeholder:
name: Placeholder Job
build_wallet_apk:
name: Build Wallet APK
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
architecture: x86_64

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Accept Android Licenses
uses: SimonMarquis/android-accept-licenses@v1

- name: Setup Android files for Wallet
uses: ./.github/actions/ci-setup-android-files
with:
root-path: 'wallets/rn_cli_wallet'
google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_BASE64 }}
secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }}
keystore: ${{ secrets.WC_INTERNAL_KEYSTORE }}
keystore-name: ${{ secrets.WC_INTERNAL_KEYSTORE_NAME }}
sentry-file: ${{ secrets.W3W_SENTRY_FILE }}
project-id: ${{ secrets.ENV_PROJECT_ID }}
relay-url: ${{ secrets.ENV_RELAY_URL }}
sentry-dsn: ${{ secrets.W3W_SENTRY_DSN }}
release-type: 'internal'

- name: Install dependencies
working-directory: ./wallets/rn_cli_wallet
run: |
yarn install --immutable

- name: Build Wallet APK
working-directory: ./wallets/rn_cli_wallet
run: |
export SENTRY_DISABLE_AUTO_UPLOAD=true && yarn run android:build:internal

- name: Rename Wallet APK for upload
run: mv ./wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/app-internal.apk ./wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/wallet-internal.apk

- name: Upload Wallet APK
uses: actions/upload-artifact@v4
with:
name: rn_cli_wallet-internal-apk
path: ./wallets/rn_cli_wallet/android/app/build/outputs/apk/internal/wallet-internal.apk

build_dapp_apk:
name: Build dApp APK
runs-on: ubuntu-latest
steps:
- name: Do nothing
run: echo "This is a placeholder workflow to enable manual triggers from feature branches."
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18

- name: Setup Java 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
architecture: x86_64

- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-

- name: Accept Android Licenses
uses: SimonMarquis/android-accept-licenses@v1

- name: Setup Android files for dApp
uses: ./.github/actions/ci-setup-android-files
with:
root-path: 'dapps/W3MWagmi'
google-services-file: ${{ secrets.ANDROID_GOOGLE_SERVICES_BASE64 }}
secrets-file: ${{ secrets.ANDROID_SECRETS_FILE }}
keystore: ${{ secrets.WC_INTERNAL_KEYSTORE }}
keystore-name: ${{ secrets.WC_INTERNAL_KEYSTORE_NAME }}
sentry-file: ${{ secrets.W3M_WAGMI_SENTRY_FILE }}
project-id: ${{ secrets.ENV_PROJECT_ID }}
relay-url: ${{ secrets.ENV_RELAY_URL }}
sentry-dsn: ${{ secrets.W3M_WAGMI_SENTRY_DSN }}
release-type: 'internal'

- name: Install dependencies
working-directory: ./dapps/W3MWagmi
run: |
yarn install --immutable

- name: Build dApp APK
working-directory: ./dapps/W3MWagmi
run: |
export SENTRY_DISABLE_AUTO_UPLOAD=true && yarn run android:build:internal

- name: Rename dApp APK for upload
run: mv ./dapps/W3MWagmi/android/app/build/outputs/apk/internal/app-internal.apk ./dapps/W3MWagmi/android/app/build/outputs/apk/internal/dapp-internal.apk

- name: Upload dApp APK
uses: actions/upload-artifact@v4
with:
name: W3MWagmi-internal-apk
path: ./dapps/W3MWagmi/android/app/build/outputs/apk/internal/dapp-internal.apk

run_e2e_tests:
name: Run E2E Tests
timeout-minutes: 30
runs-on: ubuntu-16core
needs: [build_wallet_apk, build_dapp_apk]
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Download all APKs
uses: actions/download-artifact@v4
with:
pattern: "*-apk"
path: apks
merge-multiple: true

- name: List APKs
run: |
echo "Available APKs:"
find apks -name "*.apk" | xargs ls -la

- name: Install Maestro
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
export PATH="$PATH":"$HOME/.maestro/bin"
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
maestro --version

- name: Setup Android SDK
uses: android-actions/setup-android@v3

- name: Start Android Emulator and Run Tests
uses: reactivecircus/android-emulator-runner@v2.34.0
with:
api-level: 34
target: google_apis
arch: x86_64
ram-size: 4096M
heap-size: 576M
emulator-boot-timeout: 900
profile: pixel_6
avd-name: test_device
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -no-snapshot-save -no-snapshot-load
script: |
mkdir -p debug-artifacts

# Wait for emulator to be fully ready
adb wait-for-device
adb shell 'while [ "$(getprop sys.boot_completed)" != "1" ]; do sleep 2; done'
echo "Emulator booted successfully"

# Start logcat capture in background
adb logcat -c
adb logcat > debug-artifacts/full-logcat.txt &

# Install APKs
echo "Installing APKs:"
find apks -name "*.apk" -exec echo "Installing: {}" \; -exec adb install -r {} \;

# Verify installations
echo "Verifying installed apps:"
adb shell pm list packages | grep -E "com.walletconnect" || (echo "ERROR: Apps not installed correctly" && exit 1)

# Maestro handles app launching via clearState/launchApp in test files
echo "Running Maestro native to native tests:"
maestro test .maestro/native/connect_reject.yaml
maestro test .maestro/native/connect_confirm.yaml
maestro test .maestro/native/personal_sign_confirm.yaml
maestro test .maestro/native/personal_sign_reject.yaml

# Check for crashes
echo "Checking for crashes..."
adb logcat -d | grep -E "FATAL EXCEPTION|AndroidRuntime|Process:*com.walletconnect" > debug-artifacts/crashes.txt || echo "No crashes found" > debug-artifacts/crashes.txt

- name: Upload debug artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: debug-artifacts
path: debug-artifacts/
if-no-files-found: warn

- name: Upload Maestro artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: maestro-artifacts
path: |
.maestro/
videos/
*.mp4
*.mov
if-no-files-found: warn
Loading
Loading