-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (68 loc) · 2.41 KB
/
android-instrumentation-tests.yml
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
name: Android Instrumentation Tests
on:
workflow_dispatch: {}
push:
branches: [master]
paths:
- .github/workflows/android-instrumentation-tests.yml
- 'fastlane/**'
- 'packages/**/android/**'
- 'tools/**'
- yarn.lock
pull_request:
paths:
- .github/workflows/android-instrumentation-tests.yml
- 'fastlane/**'
- 'packages/**/android/**'
- 'tools/**'
- yarn.lock
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: macos-11
env:
NDK_ABI_FILTERS: x86_64
steps:
- name: 👀 Check out repository
uses: actions/checkout@v2
with:
submodules: true
- name: ♻️ Restore workspace node modules
uses: actions/cache@v2
id: node-modules-cache
with:
path: |
# See "workspaces" → "packages" in the root package.json for the source of truth of
# which node_modules are affected by the root yarn.lock
node_modules
apps/*/node_modules
home/node_modules
packages/*/node_modules
packages/@unimodules/*/node_modules
react-native-lab/react-native/node_modules
key: ${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }}
- name: 🧶 Install node modules in root dir
run: yarn install --frozen-lockfile
- name: ♻️ Restore node modules in tools
uses: actions/cache@v2
with:
path: tools/node_modules
key: ${{ runner.os }}-tools-modules-${{ hashFiles('tools/yarn.lock') }}
- name: ♻️ Restore Gradle caches
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('android/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: 💿 Patch react-native to support single abi
run: sed -i '' 's/^APP_ABI := .*$/APP_ABI := $(if $(NDK_ABI_FILTERS),$(NDK_ABI_FILTERS),$(armeabi-v7a x86 arm64-v8a x86_64))/g' ReactAndroid/src/main/jni/Application.mk
working-directory: react-native-lab/react-native
- name: 🎸 Run instrumented unit tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: bin/expotools android-native-unit-tests --type instrumented