-
Notifications
You must be signed in to change notification settings - Fork 20
64 lines (53 loc) Β· 1.91 KB
/
Copy pathe2e.yml
File metadata and controls
64 lines (53 loc) Β· 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: π E2E Tests
env:
EXPO_PUBLIC_API_URL: ${{ vars.API_URL }}
EXPO_PUBLIC_AUTH_URL: ${{ vars.AUTH_URL }}
EXPO_PUBLIC_OPENAPI_URL: ${{ vars.OPENAPI_URL }}
on:
workflow_dispatch:
push:
branches: [test/e2e, test/e2e/**]
pull_request:
types: [closed]
branches: [main]
jobs:
e2e-full:
name: π Full E2E Tests
if: (github.event_name == 'pull_request' && github.event.pull_request.merged == true) || github.event_name == 'workflow_dispatch' || github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: π Enable KVM
run: sudo chmod 777 /dev/kvm
- name: π Setup repo
uses: actions/checkout@v4
- name: π Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: π Setup Node
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'pnpm'
- name: π Setup Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: π¦ Install dependencies
run: pnpm install
- name: π¨ Prebuild & Build APK (debug)
run: |
APP_ENV=production npx expo prebuild --clean --platform android
cd android && ./gradlew assembleDebug -PbundleInDebug=true
- name: π Install Maestro
run: curl -Ls "https://get.maestro.mobile.dev" | bash && echo "$HOME/.maestro/bin" >> $GITHUB_PATH
- name: π€ Run full E2E tests on emulator
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
arch: x86_64
emulator-options: -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -prop persist.sys.locale=en-US -prop persist.sys.language=en -prop persist.sys.country=US
script: |
adb install android/app/build/outputs/apk/debug/app-debug.apk
pnpm test:e2e