-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from XRPL-Labs/develop
v3.0.0
- Loading branch information
Showing
1,236 changed files
with
37,756 additions
and
20,829 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,45 @@ | ||
module.exports = { | ||
apps: { | ||
'ios.debug': { | ||
type: 'ios.app', | ||
binaryPath: 'ios/build/Build/Products/Debug-iphonesimulator/Xaman.app', | ||
build: 'xcodebuild -workspace ios/Xaman.xcworkspace -scheme Xaman -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build', | ||
}, | ||
'ios.release': { | ||
'xaman.ios': { | ||
type: 'ios.app', | ||
binaryPath: 'ios/build/Build/Products/Release-iphonesimulator/Xaman.app', | ||
build: 'xcodebuild -workspace ios/Xaman.xcworkspace -scheme Xaman -configuration Release -sdk iphonesimulator -derivedDataPath ios/build', | ||
}, | ||
'android.debug': { | ||
type: 'android.apk', | ||
binaryPath: 'android/app/build/outputs/apk/debug/app-debug.apk', | ||
build: 'cd android && ./gradlew app:assembleDebug app:assembleAndroidTest -DtestBuildType=debug && cd ..', | ||
}, | ||
'android.release': { | ||
'xaman.android': { | ||
type: 'android.apk', | ||
binaryPath: 'android/app/build/outputs/apk/release/app-release.apk', | ||
binaryPath: 'android/app/build/outputs/apk/release/app-x86_64-release.apk', | ||
build: 'cd android && ./gradlew app:assembleRelease app:assembleAndroidTest -DtestBuildType=release && cd ..', | ||
}, | ||
}, | ||
devices: { | ||
'ios.simulator': { | ||
type: 'ios.simulator', | ||
headless: process.env.CI ? true : undefined, | ||
device: { type: 'iPhone 15 Pro' }, | ||
}, | ||
'android.emulator': { | ||
type: 'android.apk', | ||
device: { avdName: 'Nexus_5X_API_28' }, | ||
}, | ||
'android.attached': { | ||
type: 'android.attached', | ||
device: { | ||
adbName: '.*', | ||
}, | ||
}, | ||
}, | ||
configurations: { | ||
'ios.sim.debug': { | ||
device: 'ios.simulator', | ||
app: 'ios.debug', | ||
}, | ||
'ios.sim.release': { | ||
'ios.simulator+xaman.ios': { | ||
device: 'ios.simulator', | ||
app: 'ios.release', | ||
app: 'xaman.ios', | ||
}, | ||
'android.emu.debug': { | ||
'android.emulator+xaman.android': { | ||
device: 'android.emulator', | ||
app: 'android.debug', | ||
app: 'xaman.android', | ||
}, | ||
'android.attached+xaman.android': { | ||
device: 'android.attached', | ||
app: 'xaman.android', | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: prepare-cocoapods | ||
description: Prepare Cocoapods | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Cache Pods | ||
uses: actions/cache@v4 | ||
id: podcache | ||
with: | ||
path: ios/Pods | ||
key: pods-${{ hashFiles('**/Podfile.lock') }} | ||
|
||
- name: Install Pods dependencies | ||
env: | ||
LC_ALL: en_US.UTF-8 | ||
shell: bash | ||
run: | | ||
cd ios && \ | ||
pod install --repo-update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: prepare-environment | ||
description: Prepare development environment | ||
|
||
inputs: | ||
cocoapods: | ||
description: 'Setup env with cocoapods' | ||
required: false | ||
default: 'false' | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Cache node_modules/ | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.OS }}-npm-cache- | ||
- name: Install Node dependencies | ||
shell: bash | ||
run: npm ci | ||
|
||
- name: Prepare cocoapods | ||
if: "${{ inputs.cocoapods == 'true' }}" | ||
uses: ./.github/actions/prepare-cocoapods | ||
|
||
- name: Prepare source code | ||
shell: bash | ||
run: | | ||
./scripts/build-env.sh | ||
mv src/app.tsx src/app.tsx.old && cat src/app.tsx.old|perl -pe'BEGIN{undef $/;} s/if \(isJailBroken.+?}/\/\/ No root or jailbreak detection/gms' > src/app.tsx | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: android | ||
env: | ||
CI: true | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ develop, master ] | ||
|
||
jobs: | ||
build-test: | ||
if: github.event.pull_request.draft == false | ||
runs-on: [ self-hosted, macOS, ARM64 ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Prepare Environment | ||
uses: ./.github/actions/prepare-env | ||
|
||
- name: Get version details from build.gradle | ||
run: | | ||
VERSION_CODE=$(awk -F'=' '/canonicalVersionCode/ {print $2; exit}' android/app/build.gradle | tr -d ' ') | ||
VERSION_NAME=$(awk -F'=' '/canonicalVersionName/ {print $2; exit}' android/app/build.gradle | tr -d ' ' | tr -d '"') | ||
echo "VERSION_CODE=$VERSION_CODE" >> $GITHUB_ENV | ||
echo "VERSION_NAME=$VERSION_NAME" >> $GITHUB_ENV | ||
echo "TIMESTAMP=$(date +%s)" >> $GITHUB_ENV | ||
- name: Build tests | ||
working-directory: android | ||
run: ./gradlew app:assembleAndroidTest | ||
|
||
- name: Run tests | ||
uses: reactivecircus/android-emulator-runner@v2 | ||
with: | ||
api-level: 34 | ||
avd-name: ci-actions-avd | ||
target: google_apis | ||
arch: arm64-v8a | ||
ndk: 25.1.8937393 | ||
cmake: 3.18.1 | ||
script: cd android; ./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.notClass=com.xrpllabs.xumm.DetoxTest --info | ||
|
||
- name: Test Summary | ||
uses: test-summary/action@dist | ||
with: | ||
paths: android/app/build/outputs/androidTest-results/connected/**/*.xml | ||
show: "all" | ||
if: always() | ||
|
||
- name: Build APK | ||
working-directory: android | ||
run: ./gradlew app:assembleRelease --quiet | ||
|
||
- name: Upload APK dev release | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ env.TIMESTAMP }}_Xaman_${{ env.VERSION_NAME }}_${{ env.VERSION_CODE }} APK(s) | ||
path: android/app/build/outputs/apk/release/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,44 @@ | ||
name: e2e | ||
env: | ||
CI: true | ||
DETOX_CONFIGURATION: ios.simulator+xaman.ios | ||
|
||
on: [pull_request] | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ develop, master ] | ||
|
||
jobs: | ||
build-run: | ||
if: "contains(github.event.commits[0].message, '[include e2e]')" | ||
runs-on: macos-11 | ||
build-test: | ||
if: github.event.pull_request.draft == false | ||
runs-on: [ self-hosted, macOS, ARM64 ] | ||
|
||
steps: | ||
- name: Setup Xcode | ||
uses: maxim-lobanov/setup-xcode@v1.1 | ||
with: | ||
xcode-version: latest-stable | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 18.x | ||
|
||
- run: node --version | ||
|
||
- name: Cache node modules | ||
uses: actions/cache@v1 | ||
id: cache | ||
- name: Prepare Environment | ||
uses: ./.github/actions/prepare-env | ||
with: | ||
path: node_modules | ||
key: node-modules-${{ hashFiles('**/package-lock.json') }} | ||
cocoapods: 'true' | ||
|
||
- name: Rebuild detox | ||
if: steps.cache.outputs.cache-hit == 'true' | ||
run: npx detox clean-framework-cache && npx detox build-framework-cache | ||
|
||
- name: Install Dependencies | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci | ||
|
||
- name: Cache Pods | ||
uses: actions/cache@v1 | ||
id: podcache | ||
with: | ||
path: ios/Pods | ||
key: pods-${{ hashFiles('**/Podfile.lock') }} | ||
|
||
- name: Update Pods | ||
run: | | ||
gem update cocoapods xcodeproj | ||
cd ios && pod install && cd .. | ||
- name: Prepare | ||
run: | | ||
brew tap wix/brew | ||
brew install applesimutils | ||
make build-env | ||
make generate-locales | ||
mv src/app.tsx src/app.tsx.old && cat src/app.tsx.old|perl -pe'BEGIN{undef $/;} s/if \(isJailBroken.+?}/\/\/ No root or jailbreak detection/gms' > src/app.tsx | ||
npx detox clean-framework-cache | ||
npx detox build-framework-cache | ||
- name: Build app for detox | ||
run: npx detox build e2e --configuration ${DETOX_CONFIGURATION} --if-missing | ||
|
||
- run: npx detox build e2e --configuration ios.sim.release | ||
- run: npx cucumber-js ./e2e --configuration ios.sim.release | ||
- name: Run e2e tests | ||
run: npx cucumber-js ./e2e test | ||
|
||
- name: Upload artifact files | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v2 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: artifact | ||
name: e2e artifact | ||
path: e2e/artifacts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: ios | ||
env: | ||
CI: true | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ develop, master ] | ||
|
||
jobs: | ||
build-test: | ||
if: github.event.pull_request.draft == false | ||
runs-on: [ self-hosted, macOS, ARM64 ] | ||
strategy: | ||
matrix: | ||
ios: [ 17.4 ] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Prepare Environment | ||
uses: ./.github/actions/prepare-env | ||
with: | ||
cocoapods: 'true' | ||
|
||
- name: Run tests | ||
working-directory: ios | ||
run: | | ||
xcodebuild -quiet -workspace Xaman.xcworkspace -scheme Xaman -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15,OS=${{ matrix.ios }}' -resultBundlePath TestResults test | ||
- name: Test Summary | ||
uses: kishikawakatsumi/xcresulttool@v1 | ||
with: | ||
path: ios/TestResults.xcresult | ||
if: success() || failure() |
Oops, something went wrong.