-
Notifications
You must be signed in to change notification settings - Fork 12
108 lines (92 loc) · 2.76 KB
/
test.yml
File metadata and controls
108 lines (92 loc) · 2.76 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Test
on:
workflow_call:
inputs:
ref:
description: Ref to run the tests on
type: string
required: false
jobs:
lint-test:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Setup
uses: ./.github/actions/setup
- name: Lint files
run: yarn lint
- name: Typecheck files
run: yarn typecheck
test-ios:
name: E2E test for iOS
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Setup
uses: ./.github/actions/setup
- name: Install macOS dependencies
run: |
brew tap wix/brew
brew install applesimutils
env:
HOMEBREW_NO_AUTO_UPDATE: 1
HOMEBREW_NO_INSTALL_CLEANUP: 1
- name: Install CocoaPods dependecies
working-directory: example
run: yarn pod-install
- name: Detox build
working-directory: example
run: yarn detox build --configuration ios.sim.release
- name: Detox test
working-directory: example
run: yarn detox test --configuration ios.sim.release --cleanup --headless
test-android:
name: E2E test for Android
runs-on: ubuntu-latest
steps:
# default runner has not enough space for creating emulators
- name: Free disk space
uses: jlumbroso/free-disk-space@v1.3.1
with:
android: false
tool-cache: true
dotnet: true
haskell: true
swap-storage: true
docker-images: true
large-packages: false
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- name: Setup Java
uses: actions/setup-java@v3
with:
cache: gradle
distribution: temurin
java-version: 17
- name: Setup
uses: ./.github/actions/setup
- name: Detox build
working-directory: example
run: yarn detox build --configuration android.emu.release
- name: Enable KVM group perms # make android simulator use KVM and run much faster
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Detox test
uses: reactivecircus/android-emulator-runner@v2
with:
working-directory: example
api-level: 28
arch: x86_64
avd-name: Pixel_API_28
script: yarn detox test --configuration android.emu.release --headless