forked from expo/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (85 loc) · 2.66 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Android Instrumentation Tests
on:
workflow_dispatch: {}
push:
branches: [main]
paths:
- .github/workflows/android-instrumentation-tests.yml
- android/**
- fastlane/**
# - packages/**/android/**
- packages/expo-eas-client/android/**
- packages/expo-json-utils/android/**
- packages/expo-manifests/android/**
- packages/expo-updates/android/**
- yarn.lock
- '!packages/@expo/cli/**'
pull_request:
paths:
- .github/workflows/android-instrumentation-tests.yml
- android/**
- fastlane/**
# - packages/**/android/**
- packages/expo-eas-client/android/**
- packages/expo-json-utils/android/**
- packages/expo-manifests/android/**
- packages/expo-updates/android/**
- yarn.lock
- '!packages/@expo/cli/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: macos-11
timeout-minutes: 60
env:
ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m
strategy:
matrix:
api-level: [31]
steps:
- name: ⬢ Setup Node
uses: actions/setup-node@v3
with:
node-version: '14.17'
- name: 👀 Check out repository
uses: actions/checkout@v3
with:
submodules: true
- name: 🔨 Use JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: ♻️ Restore caches
uses: ./.github/actions/expo-caches
id: expo-caches
with:
yarn-workspace: 'true'
yarn-tools: 'true'
avd: 'true'
avd-api: ${{ matrix.api-level }}
hermes-engine-aar: 'true'
- name: ➕ Add `bin` to GITHUB_PATH
run: echo "$(pwd)/bin" >> $GITHUB_PATH
- name: 🧶 Install node modules in root dir
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true'
run: yarn install --frozen-lockfile
- name: 📱 Run instrumented unit tests
timeout-minutes: 45
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
avd-name: avd-${{ matrix.api-level }}
arch: x86_64
force-avd-creation: false
script: expotools android-native-unit-tests --type instrumented
disk-size: 2048M
- name: 💾 Save test results
if: always()
uses: actions/upload-artifact@v3
with:
name: test-results
path: packages/**/build/test-reports/**/*xml