Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .coderabbit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ reviews:
auto_review:
enabled: true
drafts: false
base_branches: ["main", "dev"]
base_branches: ["main", "dev", "staging"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extend auto reviews to staging

tools:
github-checks:
timeout_ms: 300000
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/mobile-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ jobs:
echo "NODE_VERSION=$VERSION" >> "$GITHUB_ENV"
echo "NODE_VERSION_SANITIZED=${VERSION//\//-}" >> "$GITHUB_ENV"



- name: Set up Xcode
if: inputs.platform != 'android'
uses: maxim-lobanov/setup-xcode@v1
Expand Down Expand Up @@ -572,10 +570,10 @@ jobs:

- uses: actions/checkout@v4
if: inputs.platform != 'ios'
- uses: 'google-github-actions/auth@v2'
- uses: "google-github-actions/auth@v2"
with:
project_id: 'plucky-tempo-454713-r0'
workload_identity_provider: 'projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos'
project_id: "plucky-tempo-454713-r0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yarn format

workload_identity_provider: "projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos"
service_account: "[email protected]"
Comment on lines +573 to 577
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Pin external action to a commit SHA to reduce supply-chain risk

Switching quotes is fine, but the action reference still uses a mutable tag. Pin to a verified commit SHA for "google-github-actions/auth" to prevent unexpected changes.

-      - uses: "google-github-actions/auth@v2"
+      - uses: "google-github-actions/auth@<commit-sha-for-v2>"
         with:
-          project_id: "plucky-tempo-454713-r0"
-          workload_identity_provider: "projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos"
+          project_id: "plucky-tempo-454713-r0"
+          workload_identity_provider: "projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos"
           service_account: "[email protected]"

Tip: apply the same pinning across other third-party actions in this workflow for consistency.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- uses: "google-github-actions/auth@v2"
with:
project_id: 'plucky-tempo-454713-r0'
workload_identity_provider: 'projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos'
project_id: "plucky-tempo-454713-r0"
workload_identity_provider: "projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos"
service_account: "[email protected]"
- uses: "google-github-actions/auth@<commit-sha-for-v2>"
with:
project_id: "plucky-tempo-454713-r0"
workload_identity_provider: "projects/852920390127/locations/global/workloadIdentityPools/gh-self/providers/github-by-repos"
service_account: "[email protected]"
🤖 Prompt for AI Agents
.github/workflows/mobile-deploy.yml lines 573-577: the workflow references the
external action using a mutable tag ("google-github-actions/auth@v2"); replace
that with a specific verified commit SHA (e.g.
google-github-actions/auth@<commit-sha>) by looking up the official repository's
commit you want to pin, update the uses value to that SHA, and apply the same
SHA-pinning approach to all other third-party actions in this workflow for
consistency and supply-chain safety.

# Fail fast: set up JDK for keytool and verify Android secrets early
- name: Setup Java environment
Expand Down Expand Up @@ -757,8 +755,6 @@ jobs:
run: |
echo "org.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m -Dfile.encoding=UTF-8" >> ${{ env.APP_PATH }}/android/gradle.properties



- name: Install Python dependencies for Play Store upload
if: inputs.platform != 'ios'
run: |
Expand Down
143 changes: 53 additions & 90 deletions .github/workflows/mobile-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:
GH_CACHE_VERSION: v1 # Global cache version
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull in mobile e2e fixes from dev

GH_GEMS_CACHE_VERSION: v1 # Ruby gems cache version
# Performance optimizations
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=4 -Dorg.gradle.parallel=true -Dorg.gradle.configureondemand=true -Dorg.gradle.caching=true
GRADLE_OPTS: -Dorg.gradle.workers.max=4 -Dorg.gradle.parallel=true -Dorg.gradle.caching=true
CI: true
# Disable Maestro analytics in CI
MAESTRO_CLI_NO_ANALYTICS: true
Expand All @@ -29,12 +29,7 @@ on:

jobs:
e2e-android:
# TODO: The Android E2E test job is temporarily disabled due to a recurring
# Maestro driver timeout issue in the CI environment. The emulator becomes
# unresponsive, preventing Maestro from connecting. This needs further
# investigation, but has been disabled to unblock the pipeline.
# To test locally, run `./scripts/test-e2e-local.sh android --workflow-match`
if: false
if: false # Temporarily disable Android E2E until emulator disk issue resolved
concurrency:
group: ${{ github.workflow }}-android-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -61,13 +56,13 @@ jobs:
- run: corepack enable
- run: corepack prepare [email protected] --activate
- name: Cache Yarn dependencies
uses: actions/cache@v4
uses: ./.github/actions/cache-yarn
with:
path: .yarn/cache
key: ${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
- run: yarn install --immutable --silent
- name: Validate Maestro test file
run: |
[ -f app/tests/e2e/launch.android.flow.yaml ] || { echo "❌ Android E2E test file missing"; exit 1; }
- name: Cache Maestro
id: cache-maestro
uses: actions/cache@v4
Expand All @@ -90,42 +85,19 @@ jobs:
uses: android-actions/setup-android@v3
with:
accept-android-sdk-licenses: true

- name: Cache NDK
uses: actions/cache@v4
with:
path: ${{ env.ANDROID_HOME }}/ndk/${{ env.ANDROID_NDK_VERSION }}
key: ${{ runner.os }}-ndk-${{ env.ANDROID_NDK_VERSION }}
- name: Install NDK
run: sdkmanager "ndk;${{ env.ANDROID_NDK_VERSION }}"
- name: Build dependencies (outside emulator)
run: |
echo "Building dependencies..."
yarn workspace @selfxyz/mobile-app run build:deps --silent || { echo "❌ Dependency build failed"; exit 1; }
echo "✅ Dependencies built successfully"
- name: Cache Android build
uses: actions/cache@v4
with:
path: |
app/android/app/build
app/android/.gradle
key: ${{ runner.os }}-android-build-${{ hashFiles('app/android/**/*.gradle*', 'app/android/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-android-build-
- name: Build Android APK
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.ANDROID_API_LEVEL }}
arch: x86_64
target: google_apis
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -camera-front none -memory 8192 -cores 4 -accel on
disable-animations: true
script: |
echo "Building Android APK..."
chmod +x app/android/gradlew
(cd app/android && ./gradlew assembleRelease --quiet --parallel --build-cache --no-configuration-cache) || { echo "❌ Android build failed"; exit 1; }
echo "✅ Android build succeeded"
run: |
echo "Building Android APK..."
chmod +x app/android/gradlew
(cd app/android && ./gradlew assembleDebug --quiet --parallel --build-cache --no-configuration-cache) || { echo "❌ Android build failed"; exit 1; }
echo "✅ Android build succeeded"
- name: Install and Test on Android
uses: reactivecircus/android-emulator-runner@v2
with:
Expand All @@ -137,7 +109,7 @@ jobs:
disable-animations: true
script: |
echo "Installing app on emulator..."
APK_PATH="app/android/app/build/outputs/apk/release/app-release.apk"
APK_PATH="app/android/app/build/outputs/apk/debug/app-debug.apk"
[ -f "$APK_PATH" ] || { echo "❌ APK not found at $APK_PATH"; exit 1; }
adb install -r "$APK_PATH" || { echo "❌ App installation failed"; exit 1; }
echo "✅ App installed successfully"
Expand All @@ -147,9 +119,7 @@ jobs:

echo "🎭 Running Maestro tests..."
export MAESTRO_DRIVER_STARTUP_TIMEOUT=180000
maestro test tests/e2e/launch.android.flow.yaml --format junit --output app/maestro-results.xml
env:
E2E_BUILD: "true"
maestro test app/tests/e2e/launch.android.flow.yaml --format junit --output app/maestro-results.xml
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -191,13 +161,13 @@ jobs:
- run: corepack enable
- run: corepack prepare [email protected] --activate
- name: Cache Yarn dependencies
uses: actions/cache@v4
uses: ./.github/actions/cache-yarn
with:
path: .yarn/cache
key: ${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-yarn-
cache-version: ${{ env.GH_CACHE_VERSION }}-node-${{ env.NODE_VERSION_SANITIZED }}
- run: yarn install --immutable --silent
- name: Validate Maestro test file
run: |
[ -f app/tests/e2e/launch.ios.flow.yaml ] || { echo "❌ iOS E2E test file missing"; exit 1; }
- name: Cache Maestro
id: cache-maestro
uses: actions/cache@v4
Expand Down Expand Up @@ -226,53 +196,27 @@ jobs:
xcodebuild -version
echo "Xcode path:"
xcode-select -p
- name: Cache Node modules
uses: actions/cache@v4
with:
path: app/node_modules
key: ${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-${{ hashFiles('app/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-${{ env.NODE_VERSION_SANITIZED }}-
- name: Cache Ruby gems
uses: ./.github/actions/cache-bundler
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
path: app/vendor/bundle
lock-file: app/Gemfile.lock
cache-version: ${{ env.GH_CACHE_VERSION }}-${{ env.GH_GEMS_CACHE_VERSION }}-ruby${{ env.RUBY_VERSION }}
ruby-version: "3.3"
bundler-cache: true
working-directory: app
- name: Cache Pods
uses: ./.github/actions/cache-pods
with:
path: |
app/ios/Pods
~/Library/Caches/CocoaPods
lock-file: app/ios/Podfile.lock
- name: Cache Xcode build
uses: actions/cache@v4
with:
path: |
app/ios/build
~/Library/Developer/Xcode/DerivedData
~/Library/Caches/com.apple.dt.Xcode
key: ${{ runner.os }}-xcode-${{ hashFiles('app/ios/Podfile.lock') }}-${{ hashFiles('app/ios/${{ env.IOS_PROJECT_NAME }}.xcworkspace/contents.xcworkspacedata') }}
restore-keys: |
${{ runner.os }}-xcode-${{ hashFiles('app/ios/Podfile.lock') }}-
${{ runner.os }}-xcode-
- name: Cache Xcode Index
uses: actions/cache@v4
with:
path: app/ios/build/Index.noindex
key: ${{ runner.os }}-xcode-index-${{ hashFiles('app/ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-xcode-index-
- name: Cache iOS Simulator
- name: Cache DerivedData
uses: actions/cache@v4
with:
path: |
~/Library/Developer/CoreSimulator/Devices
~/Library/Developer/Xcode/iOS DeviceSupport
key: ${{ runner.os }}-simulator-v1
path: ~/Library/Developer/Xcode/DerivedData
key: ${{ runner.os }}-derived-data-${{ env.XCODE_VERSION }}-${{ hashFiles('app/ios/Podfile.lock', 'app/ios/OpenPassport.xcworkspace/contents.xcworkspacedata', 'app/ios/Self.xcworkspace/contents.xcworkspacedata') }}
restore-keys: |
${{ runner.os }}-simulator-
${{ runner.os }}-derived-data-${{ env.XCODE_VERSION }}-${{ hashFiles('app/ios/Podfile.lock') }}-
${{ runner.os }}-derived-data-${{ env.XCODE_VERSION }}-
- name: Verify iOS Runtime
run: |
echo "📱 Verifying iOS Runtime availability..."
Expand All @@ -286,8 +230,9 @@ jobs:
- name: Install iOS dependencies
run: |
echo "Installing iOS dependencies..."
(cd app/ios && pod install --silent) || { echo "❌ Pod install failed"; exit 1; }
echo "✅ Pods installed successfully"
cd app/ios
echo "📦 Installing pods via centralized script…"
bundle exec bash scripts/pod-install-with-cache-fix.sh || { echo "❌ Pod install failed"; exit 1; }
- name: Setup iOS Simulator
run: |
echo "Setting up iOS Simulator..."
Expand Down Expand Up @@ -358,13 +303,29 @@ jobs:
# Store simulator ID for later use
echo "IOS_SIMULATOR_ID=$AVAILABLE_SIMULATOR" >> $GITHUB_ENV
echo "IOS_SIMULATOR_NAME=$SIMULATOR_NAME" >> $GITHUB_ENV
- name: Resolve iOS workspace
run: |
WORKSPACE_OPEN="app/ios/OpenPassport.xcworkspace"
WORKSPACE_SELF="app/ios/Self.xcworkspace"

if xcodebuild -list -workspace "$WORKSPACE_OPEN" 2>/dev/null | grep -q "OpenPassport"; then
WORKSPACE_PATH="$WORKSPACE_OPEN"
else
WORKSPACE_PATH="$WORKSPACE_SELF"
fi

echo "WORKSPACE_PATH=$WORKSPACE_PATH" >> "$GITHUB_ENV"
echo "Resolved workspace: $WORKSPACE_PATH"
- name: Build iOS App
run: |
echo "Building iOS app..."
echo "Project: ${{ env.IOS_PROJECT_NAME }}, Scheme: ${{ env.IOS_PROJECT_SCHEME }}"

# Verify workspace exists before building
WORKSPACE_PATH="app/ios/${{ env.IOS_PROJECT_NAME }}.xcworkspace"
if [ -z "$WORKSPACE_PATH" ]; then
echo "❌ WORKSPACE_PATH is not set"
exit 1
fi
if [ ! -d "$WORKSPACE_PATH" ]; then
echo "❌ Workspace not found at: $WORKSPACE_PATH"
echo "Available workspaces:"
Expand All @@ -388,13 +349,15 @@ jobs:
echo "✅ Using scheme: ${{ env.IOS_PROJECT_SCHEME }}"

# Use cached derived data and enable parallel builds for faster compilation
# Additional flags disable indexing, restrict architecture, and use whole-module Swift compilation
# Use the simulator that was set up earlier in the workflow
xcodebuild -workspace "$WORKSPACE_PATH" -scheme ${{ env.IOS_PROJECT_SCHEME }} -configuration Release -destination "id=${{ env.IOS_SIMULATOR_ID }}" -derivedDataPath app/ios/build -jobs "$(sysctl -n hw.ncpu)" -parallelizeTargets -quiet || { echo "❌ iOS build failed"; exit 1; }
FORCE_BUNDLING=1 RCT_NO_LAUNCH_PACKAGER=1 \
xcodebuild -workspace "$WORKSPACE_PATH" -scheme ${{ env.IOS_PROJECT_SCHEME }} -configuration Debug -destination "id=${{ env.IOS_SIMULATOR_ID }}" -derivedDataPath app/ios/build -jobs "$(sysctl -n hw.ncpu)" -parallelizeTargets -quiet COMPILER_INDEX_STORE_ENABLE=NO ONLY_ACTIVE_ARCH=YES SWIFT_COMPILATION_MODE=wholemodule || { echo "❌ iOS build failed"; exit 1; }
echo "✅ iOS build succeeded"
- name: Install and Test on iOS
run: |
echo "Installing app on simulator..."
APP_PATH=$(find app/ios/build/Build/Products/Release-iphonesimulator -name "*.app" | head -1)
APP_PATH=$(find app/ios/build/Build/Products/Debug-iphonesimulator -name "*.app" | head -1)
[ -z "$APP_PATH" ] && { echo "❌ Could not find built iOS app"; exit 1; }
echo "Found app at: $APP_PATH"

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ We are actively looking for contributors. Please check the [open issues](https:/

> **Important:** Please open your pull request from the `staging` branch. Pull requests from other branches will be automatically closed.


## Contact us

[Contact us](https://t.me/selfprotocolbuilder) on telegram for feedback or questions.
Expand Down
24 changes: 12 additions & 12 deletions app/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ GEM
artifactory (3.0.17)
atomos (0.1.3)
aws-eventstream (1.4.0)
aws-partitions (1.1150.0)
aws-sdk-core (3.230.0)
aws-partitions (1.1151.0)
aws-sdk-core (3.231.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
base64
bigdecimal
jmespath (~> 1, >= 1.6.1)
logger
aws-sdk-kms (1.110.0)
aws-sdk-core (~> 3, >= 3.228.0)
aws-sdk-kms (1.111.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.197.0)
aws-sdk-core (~> 3, >= 3.228.0)
aws-sdk-s3 (1.198.0)
aws-sdk-core (~> 3, >= 3.231.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
aws-sigv4 (1.12.1)
Expand Down Expand Up @@ -99,7 +99,7 @@ GEM
drb (2.2.3)
emoji_regex (3.2.3)
escape (0.0.4)
ethon (0.17.0)
ethon (0.15.0)
ffi (>= 1.15.0)
excon (0.112.0)
faraday (1.10.4)
Expand Down Expand Up @@ -256,17 +256,17 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.4.1)
rexml (3.4.2)
rouge (3.28.0)
ruby-macho (2.5.1)
ruby2_keywords (0.0.5)
rubyzip (2.4.1)
securerandom (0.4.1)
security (0.1.5)
signet (0.20.0)
signet (0.21.0)
addressable (~> 2.8)
faraday (>= 0.17.5, < 3.a)
jwt (>= 1.5, < 3.0)
jwt (>= 1.5, < 4.0)
multi_json (~> 1.10)
simctl (1.6.10)
CFPropertyList
Expand All @@ -280,8 +280,8 @@ GEM
tty-screen (0.8.2)
tty-spinner (0.9.3)
tty-cursor (~> 0.7)
typhoeus (1.4.1)
ethon (>= 0.9.0)
typhoeus (1.5.0)
ethon (>= 0.9.0, < 0.16.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uber (0.1.0)
Expand Down
2 changes: 1 addition & 1 deletion app/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ android {
applicationId "com.proofofpassportapp"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 85
versionCode 90
versionName "2.6.4"
manifestPlaceholders = [appAuthRedirectScheme: 'com.proofofpassportapp']
externalNativeBuild {
Expand Down
8 changes: 8 additions & 0 deletions app/fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,14 @@ Push a new build to Google Play Internal Testing

Push a new build to Google Play Store

### android build_only

```sh
[bundle exec] fastlane android build_only
```

Build Android app without uploading

### android deploy_auto

```sh
Expand Down
Loading
Loading