From 865586602fbed474ac29a6fcabc481252e16c314 Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 22 May 2024 13:46:02 -0600 Subject: [PATCH 1/7] feat: Add e2e test actions Added e2e Test Actions --- .github/workflows/e2e.yml | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 0000000..796e1e3 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,69 @@ +name: Run Detox Tests + +on: + push: + branches: + - main + # paths: + # - 'package.json' + +jobs: + detox-tests-android: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' + + - name: Install dependencies + run: npm install + + - name: Install Android SDK + uses: reactivecircus/android-emulator-runner@v2 + with: + script: # Add your script here + api-level: 30 + target: default + arch: x86_64 + profile: Nexus 6 + emulator-options: -no-window + + - name: Start emulator + run: adb wait-for-device + + - name: Build Android app for Detox tests + run: yarn e2e:android:build + + - name: Run Detox tests + run: yarn e2e:android:test + + detox-tests-ios: + runs-on: macos-14 + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Select Xcode 15.1 + run: ls /Applications/ && sudo xcode-select -switch /Applications/Xcode_15.1.app # Switch Xcode version + + - name: Set up Node.js + uses: actions/setup-node@v2 + with: + node-version: '16' + + - uses: actions/setup-node@v3 + - name: Install Bundle + run: bundle install + - run: bundle exec yarn + - run: bundle exec pod install --project-directory=ios + + - name: Build iOS app + run: yarn e2e:ios:build + + - name: Run Detox tests + run: yarn e2e:ios:test From 10b11d3785fc0b7453f97d6f97b067cf402e7a85 Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 22 May 2024 13:55:44 -0600 Subject: [PATCH 2/7] Change to pull request --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 796e1e3..d19c393 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,7 +1,7 @@ name: Run Detox Tests on: - push: + pull_request: branches: - main # paths: From 9a42a39aee118e19dde3ab23a1ed837f54c5360e Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 22 May 2024 13:57:49 -0600 Subject: [PATCH 3/7] Fix node & install steps --- .github/workflows/e2e.yml | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d19c393..c5d901c 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -15,13 +15,8 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '16' - - - name: Install dependencies - run: npm install + - uses: actions/setup-node@v3 + - run: yarn - name: Install Android SDK uses: reactivecircus/android-emulator-runner@v2 @@ -51,12 +46,8 @@ jobs: - name: Select Xcode 15.1 run: ls /Applications/ && sudo xcode-select -switch /Applications/Xcode_15.1.app # Switch Xcode version - - name: Set up Node.js - uses: actions/setup-node@v2 - with: - node-version: '16' - - uses: actions/setup-node@v3 + - run: yarn - name: Install Bundle run: bundle install - run: bundle exec yarn From 945b45d0e58ad364397f4128be688e748ad86294 Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 22 May 2024 14:02:07 -0600 Subject: [PATCH 4/7] update gradle checks --- .github/workflows/e2e.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index c5d901c..d9e2043 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -21,15 +21,15 @@ jobs: - name: Install Android SDK uses: reactivecircus/android-emulator-runner@v2 with: - script: # Add your script here + script: ./gradlew connectedCheck api-level: 30 target: default arch: x86_64 profile: Nexus 6 emulator-options: -no-window - - name: Start emulator - run: adb wait-for-device + # - name: Start emulator + # run: adb wait-for-device - name: Build Android app for Detox tests run: yarn e2e:android:build From f6330c9127ecb891cc628fa0f3ab7b1285039fba Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 22 May 2024 14:37:15 -0600 Subject: [PATCH 5/7] Updated --- .github/workflows/e2e.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d9e2043..30167fc 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -17,11 +17,12 @@ jobs: - uses: actions/setup-node@v3 - run: yarn - + - name: Install Detox CLI + run: yarn global add detox-cli - name: Install Android SDK uses: reactivecircus/android-emulator-runner@v2 with: - script: ./gradlew connectedCheck + script: ./android/gradlew connectedCheck api-level: 30 target: default arch: x86_64 @@ -45,9 +46,13 @@ jobs: uses: actions/checkout@v2 - name: Select Xcode 15.1 run: ls /Applications/ && sudo xcode-select -switch /Applications/Xcode_15.1.app # Switch Xcode version - + - name: Install iOS Dependencies + run: brew tap wix/brew + - run: brew install applesimutils - uses: actions/setup-node@v3 - run: yarn + - name: Install Detox CLI + run: yarn global add detox-cli - name: Install Bundle run: bundle install - run: bundle exec yarn From 32b8929e49ba253a318f08ec4fc022919375a1a7 Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Wed, 22 May 2024 15:01:40 -0600 Subject: [PATCH 6/7] update Android script --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 30167fc..895bdb5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -22,7 +22,7 @@ jobs: - name: Install Android SDK uses: reactivecircus/android-emulator-runner@v2 with: - script: ./android/gradlew connectedCheck + script: cd android && ./gradlew connectedCheck api-level: 30 target: default arch: x86_64 From 32abb942f1db310493558bc1500e2eb94d0d3ce5 Mon Sep 17 00:00:00 2001 From: Alex Risch Date: Thu, 30 May 2024 09:57:58 -0600 Subject: [PATCH 7/7] fix android fixed android e2e action --- .github/workflows/e2e.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 895bdb5..9026f73 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -14,7 +14,10 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 - + - uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'zulu' - uses: actions/setup-node@v3 - run: yarn - name: Install Detox CLI @@ -53,10 +56,7 @@ jobs: - run: yarn - name: Install Detox CLI run: yarn global add detox-cli - - name: Install Bundle - run: bundle install - - run: bundle exec yarn - - run: bundle exec pod install --project-directory=ios + - run: npx pod-install - name: Build iOS app run: yarn e2e:ios:build