OPS: split e2e workflows per platform, add build/test split, tune CI caches
This commit is contained in:
parent
7560f92c4b
commit
e9cd4262dd
@ -10,6 +10,10 @@ on:
|
||||
- master
|
||||
workflow_dispatch:
|
||||
|
||||
concurrency:
|
||||
group: build-ios-release-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-26
|
||||
@ -26,7 +30,7 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0 # Ensures the full Git history is
|
||||
|
||||
@ -65,13 +69,12 @@ jobs:
|
||||
echo "Branch Name: ${{ env.CURRENT_BRANCH }}"
|
||||
|
||||
- name: Specify Node.js Version
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
||||
- uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
|
||||
with:
|
||||
xcode-version: latest
|
||||
|
||||
@ -244,6 +247,17 @@ jobs:
|
||||
- name: Install Node Modules
|
||||
run: npm ci --omit=dev --yes
|
||||
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
path: |
|
||||
ios/Pods
|
||||
~/Library/Caches/CocoaPods
|
||||
~/.cocoapods/repos
|
||||
key: ${{ runner.os }}-pods-ios-release-${{ hashFiles('ios/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-ios-release-
|
||||
|
||||
- name: Install CocoaPods Dependencies
|
||||
run: |
|
||||
bundle exec fastlane ios install_pods
|
||||
@ -430,7 +444,7 @@ jobs:
|
||||
|
||||
- name: Upload Build Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: build_logs
|
||||
path: ./ios/build_logs/
|
||||
@ -451,7 +465,7 @@ jobs:
|
||||
|
||||
- name: Upload IPA as Artifact
|
||||
if: success()
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: BlueWallet_IPA
|
||||
path: ${{ env.IPA_OUTPUT_PATH }}
|
||||
@ -473,7 +487,7 @@ jobs:
|
||||
BRANCH_NAME: ${{ needs.build.outputs.branch_name }}
|
||||
steps:
|
||||
- name: Checkout Project
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Set Up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
|
||||
25
.github/workflows/build-mac-catalyst.yml
vendored
25
.github/workflows/build-mac-catalyst.yml
vendored
@ -49,27 +49,26 @@ jobs:
|
||||
|
||||
- name: Checkout project
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: npm
|
||||
cache-dependency-path: package-lock.json
|
||||
cache: 'npm'
|
||||
|
||||
- name: Setup Xcode
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1.7.0
|
||||
with:
|
||||
xcode-version: latest
|
||||
|
||||
- name: Set up Ruby
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
uses: ruby/setup-ruby@v1
|
||||
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
||||
with:
|
||||
ruby-version: 3.4.8
|
||||
bundler-cache: true
|
||||
@ -78,6 +77,18 @@ jobs:
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: Cache CocoaPods
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
path: |
|
||||
ios/Pods
|
||||
~/Library/Caches/CocoaPods
|
||||
~/.cocoapods/repos
|
||||
key: ${{ runner.os }}-pods-catalyst-${{ hashFiles('ios/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-catalyst-
|
||||
|
||||
- name: Install CocoaPods dependencies
|
||||
if: github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true'
|
||||
run: bundle exec fastlane ios install_pods
|
||||
@ -110,7 +121,7 @@ jobs:
|
||||
- name: Upload Mac Catalyst DMG
|
||||
id: upload_dmg
|
||||
if: success() && (github.event_name == 'workflow_dispatch' || steps.labels.outputs.has_mac_dmg == 'true')
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: BlueWallet-Mac-Catalyst
|
||||
path: ${{ steps.build_catalyst.outputs.catalyst_dmg_path }}
|
||||
|
||||
38
.github/workflows/build-release-apk.yml
vendored
38
.github/workflows/build-release-apk.yml
vendored
@ -11,11 +11,11 @@ on:
|
||||
|
||||
jobs:
|
||||
buildReleaseApk:
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: "0"
|
||||
|
||||
@ -37,18 +37,26 @@ jobs:
|
||||
df -h
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Use specific Java version for sdkmanager to work
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'gradle'
|
||||
|
||||
- name: Use gradle caches
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('android/**/*.gradle', 'android/**/*.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Set up Android SDK
|
||||
uses: android-actions/setup-android@9fc6c4e9069bf8d3d10b2204b1fb8f6ef7065407 # v3
|
||||
@ -62,19 +70,11 @@ jobs:
|
||||
run: npm ci --yes
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
||||
with:
|
||||
ruby-version: 3.4.8
|
||||
bundler-cache: true
|
||||
|
||||
- name: Cache Ruby Gems
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-ruby-${{ hashFiles('**/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ruby-
|
||||
|
||||
- name: Generate Build Number based on timestamp
|
||||
id: build_number
|
||||
run: |
|
||||
@ -92,7 +92,7 @@ jobs:
|
||||
|
||||
- name: Upload build logs on failure
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: android-build-logs
|
||||
path: |
|
||||
@ -122,23 +122,23 @@ jobs:
|
||||
echo "APK_PATH=${APK_PATH}" >> $GITHUB_ENV
|
||||
|
||||
- name: Upload APK as artifact
|
||||
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: signed-apk
|
||||
path: ${{ env.APK_PATH }}
|
||||
if-no-files-found: error
|
||||
|
||||
browserstack:
|
||||
runs-on: macos-latest
|
||||
runs-on: macos-26
|
||||
needs: buildReleaseApk
|
||||
if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'browserstack') }}
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Set up Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
||||
with:
|
||||
ruby-version: 3.4.8
|
||||
bundler-cache: true
|
||||
|
||||
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@ -14,16 +14,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Install node_modules
|
||||
run: npm ci || npm ci
|
||||
@ -35,16 +34,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Install node_modules
|
||||
run: npm ci || npm ci
|
||||
@ -66,16 +64,15 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout project
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Install node_modules
|
||||
run: npm ci || npm ci
|
||||
|
||||
152
.github/workflows/e2e-android.yml
vendored
Normal file
152
.github/workflows/e2e-android.yml
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
name: Tests e2e Android
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: e2e-android-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Free disk space (Ubuntu)
|
||||
run: |
|
||||
echo "Disk before cleanup:" && df -h
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /opt/ghc || true
|
||||
sudo rm -rf /usr/local/share/boost || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/ndk || true
|
||||
sudo docker system prune -af || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/system-images || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/emulator || true
|
||||
rm -rf ~/.gradle/caches/modules-2/files-2.1 || true
|
||||
rm -rf ~/.gradle/caches/build-cache || true
|
||||
rm -rf ~/.npm/_cacache ~/.cache || true
|
||||
sudo rm -rf /home/runner/work/_temp || true
|
||||
echo "Disk after cleanup:" && df -h
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
||||
- name: Use gradle caches
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('android/**/*.gradle', 'android/**/*.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Install node_modules
|
||||
run: npm ci || npm ci
|
||||
|
||||
- name: Use specific Java version for sdkmanager to work
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Build
|
||||
run: npm run e2e:release-build || npm run e2e:release-build
|
||||
|
||||
- name: Package APKs
|
||||
run: |
|
||||
tar -czf bluewallet-android-apks.tar.gz \
|
||||
android/app/build/outputs/apk/release/app-release.apk \
|
||||
android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk
|
||||
|
||||
- name: Upload APKs
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: bluewallet-android-apks
|
||||
path: bluewallet-android-apks.tar.gz
|
||||
retention-days: 3
|
||||
compression-level: 0
|
||||
if-no-files-found: error
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-24.04
|
||||
needs: build
|
||||
env:
|
||||
HD_MNEMONIC: ${{ secrets.HD_MNEMONIC }}
|
||||
HD_MNEMONIC_BIP84: ${{ secrets.HD_MNEMONIC_BIP84 }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Free disk space (Ubuntu)
|
||||
run: |
|
||||
echo "Disk before cleanup:" && df -h
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /opt/ghc || true
|
||||
sudo rm -rf /usr/local/share/boost || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/ndk || true
|
||||
sudo docker system prune -af || true
|
||||
rm -rf ~/.npm/_cacache ~/.cache || true
|
||||
sudo rm -rf /home/runner/work/_temp || true
|
||||
echo "Disk after cleanup:" && df -h
|
||||
|
||||
- name: Ensure artifacts directory
|
||||
run: mkdir -p ${{ github.workspace }}/artifacts
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install node_modules
|
||||
run: npm ci || npm ci
|
||||
|
||||
- name: Use specific Java version for sdkmanager to work
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Enable KVM group perms
|
||||
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: Download APKs
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
|
||||
with:
|
||||
name: bluewallet-android-apks
|
||||
|
||||
- name: Restore APKs
|
||||
run: tar -xzf bluewallet-android-apks.tar.gz
|
||||
|
||||
- name: Run tests
|
||||
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2
|
||||
with:
|
||||
api-level: 36
|
||||
profile: pixel
|
||||
avd-name: Pixel_API_29_AOSP
|
||||
force-avd-creation: true
|
||||
enable-hw-keyboard: true
|
||||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
|
||||
arch: x86_64
|
||||
script: npm run e2e:release-test -- --record-videos failing --record-logs failing --take-screenshots failing --headless --retries 4 --reuse --artifacts-location ${{ github.workspace }}/artifacts
|
||||
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: failure()
|
||||
with:
|
||||
name: e2e-android-videos
|
||||
path: ${{ github.workspace }}/artifacts
|
||||
213
.github/workflows/e2e-ios.yml
vendored
Normal file
213
.github/workflows/e2e-ios.yml
vendored
Normal file
@ -0,0 +1,213 @@
|
||||
name: Tests e2e iOS
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: e2e-ios-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-26
|
||||
env:
|
||||
BUILD_CONFIGURATION: Release
|
||||
CCACHE_MAXSIZE: "2G"
|
||||
CCACHE_DIR: /Users/runner/.ccache
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@c4e5b1316158f92e3d49443a9d58b31d25ac0f8f # v1.306.0
|
||||
with:
|
||||
ruby-version: "3.4.8"
|
||||
bundler-cache: true
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci || npm ci
|
||||
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
|
||||
with:
|
||||
path: |
|
||||
ios/Pods
|
||||
~/Library/Caches/CocoaPods
|
||||
~/.cocoapods/repos
|
||||
key: ${{ runner.os }}-pods-prebuilt-${{ hashFiles('ios/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-prebuilt-
|
||||
|
||||
- name: Install ccache
|
||||
run: brew install ccache
|
||||
|
||||
- name: Cache ccache
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
|
||||
with:
|
||||
path: ~/.ccache
|
||||
key: ${{ runner.os }}-ccache-${{ github.sha }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ccache-
|
||||
|
||||
- name: Delete extension and watch targets
|
||||
run: |
|
||||
bundle exec ruby <<'RUBY'
|
||||
require 'xcodeproj'
|
||||
|
||||
project_path = 'ios/BlueWallet.xcodeproj'
|
||||
project = Xcodeproj::Project.open(project_path)
|
||||
|
||||
target_names = %w[BlueWalletWatch WidgetsExtension Stickers]
|
||||
embed_phase_names = ['Embed Watch Content', 'Embed Foundation Extensions']
|
||||
removed_any = false
|
||||
|
||||
target_names.each do |target_name|
|
||||
target = project.targets.find { |t| t.name == target_name }
|
||||
next unless target
|
||||
|
||||
puts "Removing target #{target_name}"
|
||||
target.dependencies.each(&:remove_from_project)
|
||||
target.build_phases.each(&:remove_from_project)
|
||||
project.targets.delete(target)
|
||||
removed_any = true
|
||||
end
|
||||
|
||||
main_target = project.targets.find { |t| t.name == 'BlueWallet' }
|
||||
if main_target
|
||||
main_target.build_phases.select { |phase| embed_phase_names.include?(phase.display_name) }.each do |phase|
|
||||
puts "Removing build phase #{phase.display_name}"
|
||||
phase.remove_from_project
|
||||
main_target.build_phases.delete(phase)
|
||||
removed_any = true
|
||||
end
|
||||
end
|
||||
|
||||
if removed_any
|
||||
project.save
|
||||
puts 'Extension and watch target references removed'
|
||||
else
|
||||
puts 'No extension or watch targets found'
|
||||
end
|
||||
RUBY
|
||||
|
||||
- name: Remove extension and watch schemes
|
||||
run: |
|
||||
rm -f ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch.xcscheme
|
||||
rm -f ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/WidgetsExtension.xcscheme
|
||||
rm -f ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/Stickers.xcscheme
|
||||
|
||||
- name: Install CocoaPods dependencies
|
||||
env:
|
||||
RCT_USE_RN_DEP: "1"
|
||||
RCT_USE_PREBUILT_RNCORE: "1"
|
||||
USE_CCACHE: "1"
|
||||
run: bundle exec fastlane ios install_pods || bundle exec fastlane ios install_pods
|
||||
|
||||
- name: Reset ccache stats
|
||||
run: ccache -z || true
|
||||
|
||||
- name: Build iOS simulator app
|
||||
working-directory: ios
|
||||
env:
|
||||
RCT_NO_LAUNCH_PACKAGER: "1"
|
||||
CCACHE_BINARY: /opt/homebrew/bin/ccache
|
||||
run: |
|
||||
set -eo pipefail
|
||||
build() {
|
||||
xcodebuild \
|
||||
-workspace BlueWallet.xcworkspace \
|
||||
-scheme BlueWallet \
|
||||
-configuration "${BUILD_CONFIGURATION}" \
|
||||
-sdk iphonesimulator \
|
||||
-destination 'generic/platform=iOS Simulator' \
|
||||
-derivedDataPath build \
|
||||
CLANG_ENABLE_EXPLICIT_MODULES=NO \
|
||||
SWIFT_ENABLE_EXPLICIT_MODULES=NO \
|
||||
build
|
||||
}
|
||||
build || build
|
||||
|
||||
- name: ccache stats
|
||||
if: always()
|
||||
run: ccache -s || true
|
||||
|
||||
- name: Package simulator app
|
||||
run: |
|
||||
APP_DIR="ios/build/Build/Products/${BUILD_CONFIGURATION}-iphonesimulator/BlueWallet.app"
|
||||
if [ ! -d "$APP_DIR" ]; then
|
||||
echo "Simulator app not found at $APP_DIR"
|
||||
find ios/build -maxdepth 5 -name '*.app' || true
|
||||
exit 1
|
||||
fi
|
||||
tar -czf BlueWallet.app.tar.gz -C "$(dirname "$APP_DIR")" "$(basename "$APP_DIR")"
|
||||
|
||||
- name: Upload simulator app
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: bluewallet-ios-app
|
||||
path: BlueWallet.app.tar.gz
|
||||
retention-days: 3
|
||||
compression-level: 0
|
||||
if-no-files-found: error
|
||||
|
||||
test:
|
||||
runs-on: macos-26
|
||||
needs: build
|
||||
env:
|
||||
HD_MNEMONIC: ${{ secrets.HD_MNEMONIC }}
|
||||
HD_MNEMONIC_BIP84: ${{ secrets.HD_MNEMONIC_BIP84 }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci || npm ci
|
||||
|
||||
- name: Install applesimutils
|
||||
run: |
|
||||
brew tap wix/brew
|
||||
brew install applesimutils
|
||||
|
||||
- name: Download simulator app
|
||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5
|
||||
with:
|
||||
name: bluewallet-ios-app
|
||||
|
||||
- name: Restore simulator app
|
||||
run: |
|
||||
mkdir -p ios/build/Build/Products/Release-iphonesimulator
|
||||
tar -xzf BlueWallet.app.tar.gz -C ios/build/Build/Products/Release-iphonesimulator
|
||||
|
||||
- name: Run detox tests
|
||||
timeout-minutes: 360
|
||||
run: |
|
||||
npm run e2e:test:ios-release -- \
|
||||
--record-videos failing \
|
||||
--record-logs failing \
|
||||
--take-screenshots failing \
|
||||
--headless \
|
||||
--retries 3 \
|
||||
--reuse \
|
||||
--artifacts-location ./artifacts
|
||||
|
||||
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
if: failure()
|
||||
with:
|
||||
name: e2e-ios-videos
|
||||
path: ./artifacts/
|
||||
247
.github/workflows/e2e.yml
vendored
247
.github/workflows/e2e.yml
vendored
@ -1,247 +0,0 @@
|
||||
name: Tests e2e
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
ios:
|
||||
runs-on: macos-26
|
||||
env:
|
||||
BUILD_CONFIGURATION: Release
|
||||
HD_MNEMONIC: ${{ secrets.HD_MNEMONIC }}
|
||||
HD_MNEMONIC_BIP84: ${{ secrets.HD_MNEMONIC_BIP84 }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Setup Ruby
|
||||
uses: ruby/setup-ruby@v1
|
||||
with:
|
||||
ruby-version: "3.4.8"
|
||||
|
||||
- name: Cache Ruby gems
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-ruby-${{ hashFiles('Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-ruby-
|
||||
|
||||
- name: Install Ruby gems
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3 --quiet
|
||||
|
||||
- name: Install Node dependencies
|
||||
run: npm ci || npm ci
|
||||
|
||||
- name: Cache CocoaPods
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5
|
||||
with:
|
||||
path: ios/Pods
|
||||
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pods-
|
||||
|
||||
- name: Install CocoaPods dependencies
|
||||
run: bundle exec fastlane ios install_pods || bundle exec fastlane ios install_pods
|
||||
|
||||
- name: Delete Apple Watch target
|
||||
run: |
|
||||
bundle exec ruby <<'RUBY'
|
||||
require 'xcodeproj'
|
||||
|
||||
project_path = 'ios/BlueWallet.xcodeproj'
|
||||
project = Xcodeproj::Project.open(project_path)
|
||||
|
||||
target_names = %w[BlueWalletWatch]
|
||||
removed_any = false
|
||||
|
||||
target_names.each do |target_name|
|
||||
target = project.targets.find { |t| t.name == target_name }
|
||||
next unless target
|
||||
|
||||
puts "Removing target #{target_name}"
|
||||
target.dependencies.each(&:remove_from_project)
|
||||
target.build_phases.each(&:remove_from_project)
|
||||
project.targets.delete(target)
|
||||
removed_any = true
|
||||
end
|
||||
|
||||
main_target = project.targets.find { |t| t.name == 'BlueWallet' }
|
||||
if main_target
|
||||
main_target.build_phases.select { |phase| phase.display_name == 'Embed Watch Content' }.each do |phase|
|
||||
puts "Removing build phase #{phase.display_name}"
|
||||
phase.remove_from_project
|
||||
main_target.build_phases.delete(phase)
|
||||
removed_any = true
|
||||
end
|
||||
end
|
||||
|
||||
if removed_any
|
||||
project.save
|
||||
puts 'Apple Watch target references removed'
|
||||
else
|
||||
puts 'No Apple Watch targets found'
|
||||
end
|
||||
RUBY
|
||||
|
||||
- name: Remove Watch schemes
|
||||
run: rm -f ios/BlueWallet.xcodeproj/xcshareddata/xcschemes/BlueWalletWatch.xcscheme
|
||||
|
||||
- name: Build iOS simulator app
|
||||
working-directory: ios
|
||||
env:
|
||||
RCT_NO_LAUNCH_PACKAGER: "1"
|
||||
run: |
|
||||
set -eo pipefail
|
||||
build() {
|
||||
xcodebuild \
|
||||
-workspace BlueWallet.xcworkspace \
|
||||
-scheme BlueWallet \
|
||||
-configuration "${BUILD_CONFIGURATION}" \
|
||||
-sdk iphonesimulator \
|
||||
-destination 'generic/platform=iOS Simulator' \
|
||||
-derivedDataPath build \
|
||||
build
|
||||
}
|
||||
build || build
|
||||
|
||||
- name: Package simulator app
|
||||
run: |
|
||||
APP_DIR="ios/build/Build/Products/${BUILD_CONFIGURATION}-iphonesimulator/BlueWallet.app"
|
||||
if [ ! -d "$APP_DIR" ]; then
|
||||
echo "Simulator app not found at $APP_DIR"
|
||||
find ios/build -maxdepth 5 -name '*.app' || true
|
||||
exit 1
|
||||
fi
|
||||
OUTPUT_DIR="BlueWallet-simulator"
|
||||
rm -rf "$OUTPUT_DIR"
|
||||
mkdir -p "$OUTPUT_DIR"
|
||||
cp -R "$APP_DIR" "$OUTPUT_DIR/BlueWallet.app"
|
||||
echo "APP_EXPORT_PATH=$OUTPUT_DIR" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Install applesimutils
|
||||
run: |
|
||||
brew tap wix/brew
|
||||
brew install applesimutils
|
||||
|
||||
- name: Run detox tests
|
||||
timeout-minutes: 360
|
||||
run: |
|
||||
npm run e2e:test:ios-release -- \
|
||||
--record-videos failing \
|
||||
--record-logs failing \
|
||||
--take-screenshots failing \
|
||||
--headless \
|
||||
--retries 3 \
|
||||
--reuse \
|
||||
--artifacts-location ./artifacts
|
||||
|
||||
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
if: failure()
|
||||
with:
|
||||
name: e2e-ios-videos
|
||||
path: ./artifacts/
|
||||
|
||||
|
||||
android:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
HD_MNEMONIC: ${{ secrets.HD_MNEMONIC }}
|
||||
HD_MNEMONIC_BIP84: ${{ secrets.HD_MNEMONIC_BIP84 }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Free disk space (Ubuntu)
|
||||
run: |
|
||||
echo "Disk before cleanup:" && df -h
|
||||
sudo rm -rf /usr/share/dotnet /opt/ghc
|
||||
sudo apt-get clean
|
||||
sudo rm -rf /opt/ghc || true
|
||||
sudo rm -rf /usr/local/share/boost || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/ndk || true
|
||||
sudo docker system prune -af || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/system-images || true
|
||||
sudo rm -rf /usr/local/lib/android/sdk/emulator || true
|
||||
rm -rf ~/.gradle/caches/modules-2/files-2.1 || true
|
||||
rm -rf ~/.gradle/caches/build-cache || true
|
||||
rm -rf ~/.npm/_cacache ~/.cache || true
|
||||
sudo rm -rf /home/runner/work/_temp || true
|
||||
echo "Disk after cleanup:" && df -h
|
||||
|
||||
- name: Ensure artifacts directory
|
||||
run: |
|
||||
mkdir -p ${{ github.workspace }}/artifacts
|
||||
|
||||
- name: Specify node version
|
||||
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: 'npm'
|
||||
cache-dependency-path: package-lock.json
|
||||
|
||||
- name: Use gradle caches
|
||||
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
|
||||
- name: Install node_modules
|
||||
run: npm ci --omit=dev --yes || npm ci --omit=dev --yes
|
||||
|
||||
- name: Use specific Java version for sdkmanager to work
|
||||
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
||||
- name: Enable KVM group perms
|
||||
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: Build
|
||||
run: npm run e2e:release-build || npm run e2e:release-build
|
||||
|
||||
- name: Install dev deps needed for tests
|
||||
run: npm i || npm i
|
||||
|
||||
- name: Run tests
|
||||
uses: reactivecircus/android-emulator-runner@e89f39f1abbbd05b1113a29cf4db69e7540cae5a # v2
|
||||
with:
|
||||
api-level: 36
|
||||
profile: pixel
|
||||
avd-name: Pixel_API_29_AOSP
|
||||
force-avd-creation: true
|
||||
enable-hw-keyboard: true
|
||||
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none -camera-front none -partition-size 2047
|
||||
arch: x86_64
|
||||
script: npm run e2e:release-test -- --record-videos failing --record-logs failing --take-screenshots failing --headless --retries 4 --reuse --artifacts-location ${{ github.workspace }}/artifacts
|
||||
|
||||
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
|
||||
if: failure()
|
||||
with:
|
||||
name: e2e-android-videos
|
||||
path: ${{ github.workspace }}/artifacts
|
||||
@ -41,7 +41,7 @@ post_install do |installer|
|
||||
react_native_post_install(
|
||||
installer,
|
||||
:mac_catalyst_enabled => true,
|
||||
# :ccache_enabled => true
|
||||
:ccache_enabled => ENV['USE_CCACHE'] == '1',
|
||||
)
|
||||
# Fix RCTDeprecation module map error with Xcode 16+/26+ (required for react-native-notifications).
|
||||
# The bridging header imports RCTBridgeModule.h which does
|
||||
|
||||
@ -2763,7 +2763,7 @@ SPEC CHECKSUMS:
|
||||
BVLinearGradient: cb006ba232a1f3e4f341bb62c42d1098c284da70
|
||||
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
|
||||
FBLazyVector: 26fd21c75314e101f280d401e97f27d54f3f7064
|
||||
hermes-engine: d893d2fd6b166772460a5b88e7f1eb2164dfe7a1
|
||||
hermes-engine: 4ed74710a31e8e31f20356c641eab1d8f7d54595
|
||||
lottie-ios: 8f959969761e9c45d70353667d00af0e5b9cadb3
|
||||
lottie-react-native: 615e5f4651bee144ea991ad8e900630b6b3daf5d
|
||||
RCTDeprecation: c7a2768f905d76ca6d2cfefb26e4349eacbdfca3
|
||||
@ -2774,7 +2774,7 @@ SPEC CHECKSUMS:
|
||||
React: 13cf8451582adb1bb324306e1893b91d1cba28c6
|
||||
React-callinvoker: 91e6a605826b684ad2e623811253b4d0c4196bef
|
||||
React-Core: 46818de5f211b2a2759ac823b591af8a0a95c2c1
|
||||
React-Core-prebuilt: c058914ab85cb1cfea0ede854d17fb966667759f
|
||||
React-Core-prebuilt: e41fca4bf96a7af702a1b6d002664ee93387baea
|
||||
React-CoreModules: a6a37afee48d4a31ab398640b0795462647d5c67
|
||||
React-cxxreact: 2ec3e2f7a8ae9303460d4ba94cde183ea90d64cd
|
||||
React-debug: 0d21117b897ce0359c9d2c9dfe952f237476a14a
|
||||
@ -2854,7 +2854,7 @@ SPEC CHECKSUMS:
|
||||
ReactCodegen: 4d6207496654098eb8425ce4a3a892f99ea8f971
|
||||
ReactCommon: a804bb8d1dcf3ecdec3a77eb8bba19b7863bbbdb
|
||||
ReactNativeCameraKit: 5974256fc608631c1c812710cd98abe95dae0f88
|
||||
ReactNativeDependencies: 9596763379fdefee23ec9355942637513dfe9206
|
||||
ReactNativeDependencies: a2d9425e97e917c1d9cb5b4431ce47b05584fabf
|
||||
RealmJS: 1c37c6bdfe060f4caa0f9175aa0eedb962622ee1
|
||||
RNCAsyncStorage: 2ad919e88b8bc2cd80e8697ce66d04d006743283
|
||||
RNCClipboard: 715fa7c6c8366f17d00f05a439ee7488f390fa5f
|
||||
@ -2876,6 +2876,6 @@ SPEC CHECKSUMS:
|
||||
RNWorklets: dd3b2cb0750090d78d85cd3b3ec0fdbeab5ce118
|
||||
Yoga: 04bb4bfeb02c0000b940c1e6e89e856cd8de5a71
|
||||
|
||||
PODFILE CHECKSUM: 7e23f7f009125b117989e69fd28c8a04aa4eacc8
|
||||
PODFILE CHECKSUM: a6ebefd60fd3fd993430ecd1d3feb222ff502eb0
|
||||
|
||||
COCOAPODS: 1.15.2
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user