Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "v3.0.0" conflict #113

Merged
merged 1 commit into from
Sep 24, 2024
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
39 changes: 21 additions & 18 deletions .detoxrc.js
Original file line number Diff line number Diff line change
@@ -1,45 +1,48 @@
module.exports = {
apps: {
'xaman.ios': {
'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': {
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',
},
'xaman.android': {
'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': {
type: 'android.apk',
binaryPath: 'android/app/build/outputs/apk/release/app-x86_64-release.apk',
binaryPath: 'android/app/build/outputs/apk/release/app-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.simulator+xaman.ios': {
'ios.sim.debug': {
device: 'ios.simulator',
app: 'xaman.ios',
app: 'ios.debug',
},
'android.emulator+xaman.android': {
device: 'android.emulator',
app: 'xaman.android',
'ios.sim.release': {
device: 'ios.simulator',
app: 'ios.release',
},
'android.attached+xaman.android': {
device: 'android.attached',
app: 'xaman.android',
'android.emu.debug': {
device: 'android.emulator',
app: 'android.debug',
},
},
};
39 changes: 32 additions & 7 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"@typescript-eslint",
"react-native",
"prettier",
"jest"
"jest",
"spellcheck"
],
"extends": [
"airbnb",
Expand Down Expand Up @@ -56,13 +57,10 @@
"arrow-body-style": 0,
"max-len": [2, {"code": 120, "tabWidth": 4, "ignoreUrls": true, "ignoreTemplateLiterals": true }],
"quotes": ["error", "single"],
"semi": "off",
"@typescript-eslint/semi": "error",
"@typescript-eslint/member-delimiter-style": "error",
// "@typescript-eslint/no-explicit-any": "error",
"semi": ["error", "always"],
"curly": [2, "multi-line"],
"comma-dangle": [2, "always-multiline"],
"class-methods-use-this": ["off", {"enforceForClassFields": false, "exceptMethods": ["startApp", "componentDidMount", "componentWillUnmount", "render"] }],
"class-methods-use-this": ["error", {"enforceForClassFields": false, "exceptMethods": ["startApp", "componentDidMount", "componentWillUnmount", "render"] }],
"global-require": 0,
"quote-props": 0,
"lines-between-class-members": "off",
Expand Down Expand Up @@ -134,6 +132,33 @@
"jest/no-disabled-tests": 1,
"jest/no-focused-tests": 2,
"jest/no-identical-title": 2,
"react/no-unused-class-component-methods": 0
"react/no-unused-class-component-methods": 0,
"spellcheck/spell-checker": [1, {
"comments": true,
"strings": true,
"identifiers": true,
"lang": "en_US",
"skipWords": [
"eslint", "redux", "middleware", "destructuring", "async", "lodash", "libs", "Backend", "istanbul", "rehydrate", "linebreak",
"decrypt", "Keychain", "passphrase", "nonexist", "js", "Crashlytics", "Analytics", "init", "Onboarding", "middlewares",
"firebase", "ios", "const", "renderer", "dev", "fallbacks", "Utils", "sha512", "sha256", "sha1", "fn", "ja", "cn", "auth",
"cb", "loggin", "api", "src", "biometric", "Biometry", "rtl", "grey", "Unmount", "passcode", "Selectable", "png", "xrpl", "accountlib",
"Prev", "orm", "reselect", "keypair", "readonly", "uuid", "uuidv4", "desc", "sml", "wss", "altnet", "rippletest", "ws", "args",
"tx", "namespace", "bignumber", "Xrp", "counterparty", "str", "params", "req", "eg", "param", "timestamp", "idempotency", "Num", "testnet",
"utf", "xumm", "netinfo", "uri", "Interactable", "bool", "schemas", "Ious", "upsert", "Trustline", "rpepoch", "unix", "iso8601", "ecrypt",
"privatekey", "multisign", "tes", "Reactotron", "resize", "Interitem", "multisigned", "txid", "rgba", "jsx", "uint8", "img", "btn", "pbold",
"Devnet", "Mainnet", "Swiper", "calc", "abcdefgh", "cancelable", "uniqBy", "memoize", "Memoized", "html", "len", "fg", "bg", "ctx", "checksum",
"ecc", "uniq", "Truthy", "Responder", "ter", "ko", "zh", "mailto", "tabbar", "https", "gcm", "tf", "xlight", "aps", "tec", "barcodes", "Barcode",
"txblob", "tos", "gif", "ic", "asf", "ok", "Sig", "haptic", "Signable", "Unauthorize", "Preauth", "payid", "Biometrics", "Towo", "tz", "xrpscan",
"xrplorer", "bithomp", "xpring", "xrplns", "Pincode", "Txn", "iap", "Realtime", "datastore", "decrypted", "Tangem", "Sdk", "Secp256k1", "blockchain",
"Escrowed", "xapp", "Veriff", "Codec", "xapps", "Pressable", "nft", "ott", "Luminance", "HexToRgbA", "Misconfiguration", "kyc", "debounce", "debounced",
"nfc", "lsf", "nfts", "Taxon", "fioprotocol", "iou", "dy", "vy", "pb", "nf", "origintype", "Xaman", "xls20", "livenet", "feeunits", "Preflight", "ctid",
"explainer", "Cancelled", "nftoken", "Remint", "amm"
],
"skipIfMatch": [
"http://[^s]*",
"^[-\\w]+\/[-\\w\\.]+$"
]
}]
}
}
20 changes: 0 additions & 20 deletions .github/actions/prepare-cocoapods/action.yml

This file was deleted.

39 changes: 0 additions & 39 deletions .github/actions/prepare-env/action.yml

This file was deleted.

62 changes: 0 additions & 62 deletions .github/workflows/android.yml

This file was deleted.

74 changes: 50 additions & 24 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,70 @@
name: e2e
env:
CI: true
DETOX_CONFIGURATION: ios.simulator+xaman.ios

on:
push:
branches: [ master ]
pull_request:
branches: [ develop, master ]
on: [pull_request]

jobs:
build-test:
if: github.event.pull_request.draft == false
runs-on: [ self-hosted, macOS, ARM64 ]
build-run:
if: "contains(github.event.commits[0].message, '[include e2e]')"
runs-on: macos-11

steps:
- name: Setup Xcode
uses: maxim-lobanov/[email protected]
with:
xcode-version: latest-stable

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Prepare Environment
uses: ./.github/actions/prepare-env
- 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
with:
cocoapods: 'true'
path: node_modules
key: node-modules-${{ hashFiles('**/package-lock.json') }}

- name: Rebuild detox
run: |
npx detox clean-framework-cache
npx detox build-framework-cache
if: steps.cache.outputs.cache-hit == 'true'
run: 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
- 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

- name: Run e2e tests
run: npx cucumber-js ./e2e test
- run: npx detox build e2e --configuration ios.sim.release
- run: npx cucumber-js ./e2e --configuration ios.sim.release

- name: Upload artifact files
if: ${{ always() }}
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: e2e artifact
name: artifact
path: e2e/artifacts/
38 changes: 0 additions & 38 deletions .github/workflows/ios.yml

This file was deleted.

Loading
Loading