Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
262f9d7
Add Maestro e2e testing
transphorm Aug 4, 2025
c4d68fa
Run Maestro flows in parallel
transphorm Aug 4, 2025
6c56e26
Fix mobile e2e workflow
transphorm Aug 4, 2025
31f77f1
Fix e2e script flow path
transphorm Aug 4, 2025
0fbd2d4
prettier
transphorm Aug 4, 2025
07b4d77
fix
transphorm Aug 4, 2025
19ffd83
prettier
transphorm Aug 4, 2025
e6d40c2
standardize yml files and new formatting commands
transphorm Aug 4, 2025
f3b22f7
fix ndk
transphorm Aug 4, 2025
ae43a43
fix exclusions
transphorm Aug 4, 2025
6555bdc
use double quotes for yml files
transphorm Aug 4, 2025
73150e3
feedback
transphorm Aug 4, 2025
aec5c70
fixes
transphorm Aug 4, 2025
ab853c9
fixes
transphorm Aug 4, 2025
432f882
fix
transphorm Aug 4, 2025
643ed8c
fix ios job
transphorm Aug 4, 2025
d3ae090
unneeded
transphorm Aug 4, 2025
6c8a3f7
fix workflows
transphorm Aug 4, 2025
09ba2ea
fix launch workflow
transphorm Aug 4, 2025
55a251a
fix
transphorm Aug 4, 2025
dc835ff
fix pipeline
transphorm Aug 4, 2025
bb69e7d
workflow fixes
transphorm Aug 4, 2025
c40e2d6
install app to emulators
transphorm Aug 4, 2025
3988386
better logging
transphorm Aug 4, 2025
33c63e1
save current version of test script
transphorm Aug 4, 2025
5585583
android works. ios wip. update locks
transphorm Aug 4, 2025
16de329
fix pipelines
transphorm Aug 4, 2025
4204459
cr feedback
transphorm Aug 4, 2025
e84dc99
fix android e2e test
transphorm Aug 4, 2025
1fbc1c7
Split mobile e2e workflow by platform (#842)
transphorm Aug 6, 2025
167cb29
feedback
transphorm Aug 6, 2025
decd0d7
Merge branch 'dev' into codex/remove-detox-and-configure-maestro-cli
transphorm Aug 6, 2025
dc7e295
fixes
transphorm Aug 6, 2025
28c4b19
ignore for now
transphorm Aug 6, 2025
8faf185
ignore
transphorm Aug 6, 2025
de372e0
fix tests
transphorm Aug 6, 2025
c0efd03
fix ios simulator booting
transphorm Aug 6, 2025
11cda72
fix ios test
transphorm Aug 6, 2025
cfa68b2
shutdown after run
transphorm Aug 6, 2025
c2d5498
fix ios test
transphorm Aug 6, 2025
318b943
better timing
transphorm Aug 6, 2025
fb9a1c4
increase ios timeout
transphorm Aug 6, 2025
367c52f
fix both flows
transphorm Aug 6, 2025
b959cc2
fix pipeline
transphorm Aug 6, 2025
81f68dc
combine command
transphorm Aug 6, 2025
1245592
fix ios
transphorm Aug 6, 2025
713ce7a
break up build steps for better caching
transphorm Aug 6, 2025
ef39f66
remove cache
transphorm Aug 6, 2025
95ec9a7
fix ios and android test pipelines
transphorm Aug 6, 2025
78bc296
update logic
transphorm Aug 6, 2025
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 .github/actions/get-version/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ runs:
shell: bash
run: |
VERSION=$(node -p "require('${{ inputs.app_path }}/package.json').version")
echo "VERSION=$VERSION" >> $GITHUB_ENV
echo "VERSION=$VERSION" >> $GITHUB_ENV
9 changes: 4 additions & 5 deletions .github/actions/mobile-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ runs:
sudo locale-gen en_US.UTF-8
sudo update-locale LANG=en_US.UTF-8


- name: Setup Ruby environment
uses: ruby/setup-ruby@v1
with:
Expand All @@ -57,11 +56,11 @@ runs:
shell: bash
run: |
cd ${{ inputs.app_path }}

# Configure Yarn
corepack enable
yarn set version 4.6.0

echo "📦 Installing JavaScript dependencies with strict lock file..."
if ! yarn install --immutable; then
echo ""
Expand All @@ -77,14 +76,14 @@ runs:
echo "This ensures everyone has the exact same dependency versions."
exit 1
fi

# Run mobile-specific installation
if [[ "${{ runner.os }}" == "macOS" ]]; then
yarn install-app:mobile-deploy:ios
else
yarn install-app:mobile-deploy
fi

# Install Ruby gems with bundler (respecting cache)
echo "📦 Installing Ruby gems with strict lock file..."
if ! bundle install --jobs 4 --retry 3; then
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/yarn-install/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ runs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: "yarn"
cache-dependency-path: yarn.lock

- name: Install dependencies
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: OpenPassport CI/CD
name: Circuits Build
on:
push:
branches:
Expand All @@ -16,7 +16,7 @@ on:

jobs:
build:
runs-on: ['self-hosted', 'selfxyz-org', 'ubuntu-22-04', '128ram']
runs-on: ["self-hosted", "selfxyz-org", "ubuntu-22-04", "128ram"]

steps:
- name: Checkout Repository
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/circuits.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
name: Self Circuits CI/CD
name: Circuits CI
on:
push:
branches:
- dev
- main
- openpassportv2
paths:
- 'circuits/**'
- 'common/**'
- "circuits/**"
- "common/**"
pull_request:
branches:
- dev
- main
- openpassportv2
paths:
- 'circuits/**'
- 'common/**'
- "circuits/**"
- "common/**"
jobs:
run_circuit_tests:
if: github.event.pull_request.draft == false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: General Self CI
name: Common CI

on:
pull_request:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/contracts.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Self Contracts CI/CD
name: Contracts CI
on:
push:
branches:
- dev
- main
paths:
- 'contracts/**'
- 'common/**'
- "contracts/**"
- "common/**"
pull_request:
branches:
- dev
- main
paths:
- 'contracts/**'
- 'common/**'
- "contracts/**"
- "common/**"
jobs:
test_contracts:
if: github.event.pull_request.draft == false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mobile-bundle-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: mobile-bundle-analysis
name: Mobile Bundle Analysis

env:
NODE_VERSION: 18
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: App CI
name: Mobile CI
env:
# Build environment versions
NODE_VERSION: 18
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/mobile-deploy-auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
types: [closed]
branches: [main, dev]
paths:
- 'app/**'
- '!app/**/*.md'
- '!app/docs/**'
- "app/**"
- "!app/**/*.md"
- "!app/docs/**"

permissions:
contents: write
Expand All @@ -22,21 +22,21 @@ jobs:
deployment_track: ${{ steps.check.outputs.deployment_track }}
version_bump: ${{ steps.check.outputs.version_bump }}
platforms: ${{ steps.check.outputs.platforms }}

steps:
- name: Check deployment conditions
id: check
run: |
echo "🔍 Checking deployment conditions..."

# Skip if PR has skip-deploy in title or body
if [[ "${{ github.event.pull_request.title }}" =~ \[skip-deploy\] ]] ||
[[ "${{ github.event.pull_request.body }}" =~ \[skip-deploy\] ]]; then
echo "should_deploy=false" >> $GITHUB_OUTPUT
echo "⏭️ Skipping deployment due to [skip-deploy] flag"
exit 0
fi

# Determine deployment track based on target branch
if [[ "${{ github.base_ref }}" == "main" ]]; then
echo "deployment_track=production" >> $GITHUB_OUTPUT
Expand All @@ -45,7 +45,7 @@ jobs:
echo "deployment_track=internal" >> $GITHUB_OUTPUT
echo "🧪 Deployment track: internal testing"
fi

# Determine version bump from PR labels
labels="${{ join(github.event.pull_request.labels.*.name, ',') }}"
if [[ "$labels" =~ version:major ]]; then
Expand All @@ -61,11 +61,11 @@ jobs:
echo "version_bump=build" >> $GITHUB_OUTPUT
echo "📈 Version bump: build only"
fi

# Always deploy both platforms for now (can be enhanced later)
echo 'platforms=["ios", "android"]' >> $GITHUB_OUTPUT
echo "should_deploy=true" >> $GITHUB_OUTPUT

- name: Log deployment info
if: steps.check.outputs.should_deploy == 'true'
run: |
Expand Down Expand Up @@ -106,4 +106,4 @@ jobs:
- name: Notify skip
run: |
echo "📱 Mobile deployment was skipped for this PR"
echo "To deploy manually, use the 'Run workflow' button on the Mobile App Deployments workflow"
echo "To deploy manually, use the 'Run workflow' button on the Mobile App Deployments workflow"
12 changes: 6 additions & 6 deletions .github/workflows/mobile-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Mobile App Deployments
name: Mobile Deploy

env:
# Build environment versions
Expand All @@ -9,11 +9,11 @@ env:
ANDROID_NDK_VERSION: 27.0.11718014

# Cache versioning - increment these to bust caches when needed
GH_CACHE_VERSION: v1 # Global cache version
GH_YARN_CACHE_VERSION: v1 # Yarn-specific cache version
GH_GEMS_CACHE_VERSION: v1 # Ruby gems cache version
GH_PODS_CACHE_VERSION: v1 # CocoaPods cache version
GH_GRADLE_CACHE_VERSION: v1 # Gradle cache version
GH_CACHE_VERSION: v1 # Global cache version
GH_YARN_CACHE_VERSION: v1 # Yarn-specific cache version
GH_GEMS_CACHE_VERSION: v1 # Ruby gems cache version
GH_PODS_CACHE_VERSION: v1 # CocoaPods cache version
GH_GRADLE_CACHE_VERSION: v1 # Gradle cache version

# Path configuration
WORKSPACE: ${{ github.workspace }}
Expand Down
107 changes: 107 additions & 0 deletions .github/workflows/mobile-e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
name: Mobile E2E

env:
# Build environment versions
NODE_VERSION: 18
JAVA_VERSION: 17
ANDROID_API_LEVEL: 35
ANDROID_NDK_VERSION: 27.0.11718014
# Performance optimizations
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dorg.gradle.workers.max=2
CI: true
# Disable Maestro analytics in CI
MAESTRO_CLI_NO_ANALYTICS: true

on:
push:
branches: [main, release/**]
paths:
- "app/**"
- ".github/workflows/mobile-e2e.yml"
pull_request:
paths:
- "app/**"
- ".github/workflows/mobile-e2e.yml"

jobs:
e2e:
timeout-minutes: 45
strategy:
matrix:
include:
- platform: android
os: ubuntu-latest
- platform: ios
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- run: corepack enable
- run: corepack prepare [email protected] --activate
- run: yarn install --immutable --silent
- name: Install Maestro
run: |
curl -Ls "https://get.maestro.mobile.dev" | bash
echo "$HOME/.maestro/bin" >> $GITHUB_PATH
env:
MAESTRO_VERSION: 1.41.0
- name: Setup Java environment
if: matrix.platform == 'android'
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: ${{ env.JAVA_VERSION }}
- name: Setup Android SDK
if: matrix.platform == 'android'
uses: android-actions/setup-android@v3
with:
accept-android-sdk-licenses: true
- name: Install NDK
if: matrix.platform == 'android'
run: sdkmanager "ndk;${{ env.ANDROID_NDK_VERSION }}"
- name: Run Android flow
if: matrix.platform == 'android'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: x86_64
target: google_apis
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim
disable-animations: true
script: |
cd app
yarn build:deps
cd android
./gradlew assembleDebug
cd ..
# Run Maestro test (no platform flag needed - auto-detects Android emulator)
maestro test e2e/launch.flow.yaml --format junit --output maestro-results.xml || {
echo "Maestro test failed, but continuing to upload results..."
exit 1
}
- name: Run iOS flow
if: matrix.platform == 'ios'
run: |
cd app
yarn build:deps
cd ios
pod install
cd ..
xcrun simctl boot "iPhone 15" || true
# Optimized xcodebuild with parallel builds
xcodebuild -workspace ios/OpenPassport.xcworkspace -scheme OpenPassport -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build -jobs $(sysctl -n hw.ncpu) -parallelizeTargets
# Run Maestro test (no platform flag needed - auto-detects iOS simulator)
maestro test e2e/launch.flow.yaml --format junit --output maestro-results.xml || {
echo "Maestro test failed, but continuing to upload results..."
exit 1
}
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: maestro-results-${{ matrix.platform }}
path: app/maestro-results.xml
20 changes: 10 additions & 10 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Publish to npm
name: NPM Publish

on:
push:
branches:
- dev
paths:
- 'sdk/core/package.json'
- 'sdk/qrcode/package.json'
- 'common/package.json'
- "sdk/core/package.json"
- "sdk/qrcode/package.json"
- "common/package.json"
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -52,8 +52,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
node-version: "18"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
uses: ./.github/actions/yarn-install
Expand Down Expand Up @@ -82,8 +82,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
node-version: "18"
registry-url: "https://registry.npmjs.org"

- name: Install Dependencies
uses: ./.github/actions/yarn-install
Expand Down Expand Up @@ -111,8 +111,8 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
node-version: "18"
registry-url: "https://registry.npmjs.org"
- uses: actions/checkout@v4
- name: Install Dependencies
uses: ./.github/actions/yarn-install
Expand Down
Loading
Loading