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

feat: Add e2e test actions #83

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Run Detox Tests

on:
pull_request:
branches:
- main
# paths:
# - 'package.json'

jobs:
detox-tests-android:
runs-on: ubuntu-latest

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
run: yarn global add detox-cli
- name: Install Android SDK
uses: reactivecircus/android-emulator-runner@v2
with:
script: cd android && ./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: 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: 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
- run: npx pod-install

- name: Build iOS app
run: yarn e2e:ios:build

- name: Run Detox tests
run: yarn e2e:ios:test
Loading