diff --git a/.github/workflows/comments-watchdog.yml b/.github/workflows/comments-watchdog.yml index 0c5d71ee911..132b6bce74c 100644 --- a/.github/workflows/comments-watchdog.yml +++ b/.github/workflows/comments-watchdog.yml @@ -65,7 +65,7 @@ jobs: fi - name: Upload deleted comments log as artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: deleted-comments-log path: deleted_comments_log.txt \ No newline at end of file diff --git a/.github/workflows/macstadium-tests.yml b/.github/workflows/macstadium-tests.yml index b458a442609..b4dfe0d643e 100644 --- a/.github/workflows/macstadium-tests.yml +++ b/.github/workflows/macstadium-tests.yml @@ -17,9 +17,6 @@ jobs: - name: Set up github keys run: git config core.sshCommand "ssh -i ~/.ssh/id_ed25519 -F /dev/null" - - name: Clean iOS app - run: yarn cache clean && yarn clean:ios > /dev/null 2>&1 || true - - name: Set up ENV vars & scripts env: CI_SCRIPTS: ${{ secrets.CI_SCRIPTS }} @@ -168,6 +165,10 @@ jobs: sed -i'' -e "s/IS_TESTING=false/IS_TESTING=true/" .env && rm -f .env-e yarn detox build --configuration ios.sim.release - - name: Detox iOS e2e tests + - name: Detox iOS e2e tests parallel + run: | + ./scripts/run-parallel-e2e.sh 3 + + - name: Detox iOS e2e tests serial run: | - ./scripts/run-retry-tests.sh 3 + ./scripts/run-serial-e2e.sh 3 diff --git a/e2e/1_importAndWatchWalletsFlow.spec.ts b/e2e/parallel/1_importAndWatchWalletsFlow.spec.ts similarity index 98% rename from e2e/1_importAndWatchWalletsFlow.spec.ts rename to e2e/parallel/1_importAndWatchWalletsFlow.spec.ts index 311e6ce5987..0e9b30cdaab 100644 --- a/e2e/1_importAndWatchWalletsFlow.spec.ts +++ b/e2e/parallel/1_importAndWatchWalletsFlow.spec.ts @@ -9,8 +9,8 @@ import { authenticatePin, delayTime, afterAllcleanApp, -} from './helpers'; -import { WALLET_VARS } from './testVariables'; +} from '../helpers'; +import { WALLET_VARS } from '../testVariables'; const android = device.getPlatform() === 'android'; diff --git a/e2e/2_newWalletFlow.spec.ts b/e2e/parallel/2_newWalletFlow.spec.ts similarity index 94% rename from e2e/2_newWalletFlow.spec.ts rename to e2e/parallel/2_newWalletFlow.spec.ts index 0c608336562..241dcb4e5d1 100644 --- a/e2e/2_newWalletFlow.spec.ts +++ b/e2e/parallel/2_newWalletFlow.spec.ts @@ -1,5 +1,5 @@ import { device } from 'detox'; -import { beforeAllcleanApp, checkIfVisible, waitAndTap, authenticatePin, delayTime, afterAllcleanApp } from './helpers'; +import { beforeAllcleanApp, checkIfVisible, waitAndTap, authenticatePin, delayTime, afterAllcleanApp } from '../helpers'; const android = device.getPlatform() === 'android'; diff --git a/e2e/3_homeScreen.spec.ts b/e2e/parallel/3_homeScreen.spec.ts similarity index 98% rename from e2e/3_homeScreen.spec.ts rename to e2e/parallel/3_homeScreen.spec.ts index 94fea2546f0..1e32821ace8 100644 --- a/e2e/3_homeScreen.spec.ts +++ b/e2e/parallel/3_homeScreen.spec.ts @@ -8,7 +8,7 @@ import { afterAllcleanApp, tap, delayTime, -} from './helpers'; +} from '../helpers'; const RAINBOW_TEST_WALLET = 'rainbowtestwallet.eth'; diff --git a/e2e/4_discoverSheetFlow.spec.ts b/e2e/parallel/4_discoverSheetFlow.spec.ts similarity index 99% rename from e2e/4_discoverSheetFlow.spec.ts rename to e2e/parallel/4_discoverSheetFlow.spec.ts index a04abb933e8..0e2f9d632a3 100644 --- a/e2e/4_discoverSheetFlow.spec.ts +++ b/e2e/parallel/4_discoverSheetFlow.spec.ts @@ -11,7 +11,7 @@ import { delayTime, importWalletFlow, afterAllcleanApp, -} from './helpers'; +} from '../helpers'; const ios = device.getPlatform() === 'ios'; diff --git a/e2e/6_watchedWalletCollectionActionsFlow.spec.ts b/e2e/parallel/5_watchedWalletCollectionActionsFlow.spec.ts similarity index 98% rename from e2e/6_watchedWalletCollectionActionsFlow.spec.ts rename to e2e/parallel/5_watchedWalletCollectionActionsFlow.spec.ts index 405d939e303..03fa4a5ab3e 100644 --- a/e2e/6_watchedWalletCollectionActionsFlow.spec.ts +++ b/e2e/parallel/5_watchedWalletCollectionActionsFlow.spec.ts @@ -9,7 +9,7 @@ import { checkIfDoesntExist, delayTime, afterAllcleanApp, -} from './helpers'; +} from '../helpers'; describe('Watched showcase and hidden actions flow', () => { beforeAll(async () => { diff --git a/e2e/7_maliciousDappConnection.spec.ts b/e2e/parallel/6_maliciousDappConnection.spec.ts similarity index 96% rename from e2e/7_maliciousDappConnection.spec.ts rename to e2e/parallel/6_maliciousDappConnection.spec.ts index 0b6f49fd0bf..ad13c226403 100644 --- a/e2e/7_maliciousDappConnection.spec.ts +++ b/e2e/parallel/6_maliciousDappConnection.spec.ts @@ -10,8 +10,8 @@ import { delayTime, tapAtPoint, checkIfExists, -} from './helpers'; -import { WALLET_VARS } from './testVariables'; +} from '../helpers'; +import { WALLET_VARS } from '../testVariables'; describe('Check malicious dapp warning', () => { beforeAll(async () => { diff --git a/e2e/8_manualBackup.spec.ts b/e2e/parallel/7_manualBackup.spec.ts similarity index 98% rename from e2e/8_manualBackup.spec.ts rename to e2e/parallel/7_manualBackup.spec.ts index bc595e5cdf2..680e042fc4d 100644 --- a/e2e/8_manualBackup.spec.ts +++ b/e2e/parallel/7_manualBackup.spec.ts @@ -6,12 +6,11 @@ import { tap, tapByText, delayTime, - tapAtPoint, checkIfExistsByText, checkIfExists, waitAndTap, checkIfDoesntExist, -} from './helpers'; +} from '../helpers'; describe('Backups', () => { beforeAll(async () => { diff --git a/e2e/5_sendSheetFlowContacts.spec.ts b/e2e/serial/1_sendSheetFlowContacts.spec.ts similarity index 99% rename from e2e/5_sendSheetFlowContacts.spec.ts rename to e2e/serial/1_sendSheetFlowContacts.spec.ts index 65de2a28ab8..ece0ee36771 100644 --- a/e2e/5_sendSheetFlowContacts.spec.ts +++ b/e2e/serial/1_sendSheetFlowContacts.spec.ts @@ -12,7 +12,7 @@ import { tapByText, delayTime, afterAllcleanApp, -} from './helpers'; +} from '../helpers'; const android = device.getPlatform() === 'android'; diff --git a/e2e/9_swaps.spec.ts b/e2e/serial/2_swaps.spec.ts similarity index 98% rename from e2e/9_swaps.spec.ts rename to e2e/serial/2_swaps.spec.ts index 67d866e2326..9a4e3ed972c 100644 --- a/e2e/9_swaps.spec.ts +++ b/e2e/serial/2_swaps.spec.ts @@ -23,11 +23,10 @@ import { delayTime, swipeUntilVisible, tapAndLongPress, - swipe, -} from './helpers'; +} from '../helpers'; import { expect } from '@jest/globals'; -import { WALLET_VARS } from './testVariables'; +import { WALLET_VARS } from '../testVariables'; describe('Swap Sheet Interaction Flow', () => { beforeAll(async () => { diff --git a/scripts/run-parallel-e2e.sh b/scripts/run-parallel-e2e.sh new file mode 100755 index 00000000000..71961395466 --- /dev/null +++ b/scripts/run-parallel-e2e.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +max_retries="$1" +count=0 + +until (( count >= max_retries )) +do + ./node_modules/.bin/detox test parallel/ -c ios.sim.release --maxWorkers 2 -- --forceExit --bail 1 + ret_val=$? + if [ $ret_val -eq 0 ]; then + exit 0 + fi + ((count++)) + echo "Test failed, attempt $count/$max_retries..." +done + + diff --git a/scripts/run-retry-tests.sh b/scripts/run-serial-e2e.sh similarity index 70% rename from scripts/run-retry-tests.sh rename to scripts/run-serial-e2e.sh index b3584fbe9cd..dc1a1f6640e 100755 --- a/scripts/run-retry-tests.sh +++ b/scripts/run-serial-e2e.sh @@ -5,7 +5,7 @@ count=0 until (( count >= max_retries )) do - ./node_modules/.bin/detox test -c ios.sim.release --maxWorkers 2 -- --forceExit --bail 1 + ./node_modules/.bin/detox test serial/ -c ios.sim.release --maxWorkers 1 -- --forceExit --bail 1 ret_val=$? if [ $ret_val -eq 0 ]; then exit 0 @@ -15,4 +15,4 @@ do done echo "Tests failed after $max_retries attempts." -exit 1 +exit 1 \ No newline at end of file