App / Tests / E2E #6
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
name: App / Tests / E2E | |
on: | |
workflow_dispatch: | |
jobs: | |
build-and-test: | |
name: Build, Test iOS, and Test Android | |
runs-on: macos-14 | |
env: | |
MAESTRO_CLI_NO_ANALYTICS: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: yarn | |
cache-dependency-path: '**/yarn.lock' | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt' | |
java-version: '11' | |
- name: Set LANG globally for subsequent steps | |
run: echo "LANG=en_US.UTF-8" >> $GITHUB_ENV | |
- name: Install maestro CLI | |
run: | | |
brew tap mobile-dev-inc/tap | |
brew install maestro | |
- name: Setup project | |
run: yarn setup | |
- name: Pod install for iOS | |
run: npx pod-install | |
- name: Start expo metro server | |
run: npx expo start & | |
- name: Take screenshots (iOS) | |
uses: futureware-tech/simulator-action@v2 | |
with: | |
model: 'iPhone 14 Pro' | |
- name: Maestro iOS Test | |
run: maestro test maestro/take-screenshots-ios.yaml | |
- name: Start Android Emulator | |
uses: reactivecircus/android-emulator-runner@v2 | |
with: | |
api-level: 29 | |
arch: x86_64 | |
ram-size: 2048M | |
target: default | |
- name: Take screenshots (Android) | |
run: maestro test maestro/take-screenshots.yaml | |
- name: Archive screenshots | |
uses: actions/upload-artifact@v4 | |
with: | |
name: screenshots | |
path: | | |
dist |