-
Notifications
You must be signed in to change notification settings - Fork 2
63 lines (54 loc) · 2.28 KB
/
android.yml
File metadata and controls
63 lines (54 loc) · 2.28 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
name: Android
on: [push, pull_request]
jobs:
android-react-native:
runs-on: macos-latest
steps:
- name: Checkout project
if: "!contains(github.event.head_commit.message, '[skip ci]')"
uses: actions/checkout@v1
- name: Specify node version
if: "!contains(github.event.head_commit.message, '[skip ci]')"
uses: actions/setup-node@v1
with:
node-version: 12
- name: Use specific Java version for sdkmanager to work
if: "!contains(github.event.head_commit.message, '[skip ci]')"
uses: joschi/setup-jdk@v1
with:
java-version: 'openjdk8'
architecture: 'x64'
- name: Download Android Emulator Image
if: "!contains(github.event.head_commit.message, '[skip ci]')"
run: |
echo y | sudo $ANDROID_HOME/tools/bin/sdkmanager --verbose "system-images;android-27;google_apis;x86"
$ANDROID_HOME/tools/bin/avdmanager create avd -n emu -k "system-images;android-27;google_apis;x86" -b "x86" -c 1G -d 7 -f
- name: Install node_modules & Deploy
if: "!contains(github.event.head_commit.message, '[skip ci]')"
working-directory: ./examples/RNSecureElementTester
env:
BINTRAY_USER: ${{ secrets.BINTRAY_USER }}
BINTRAY_APIKEY: ${{ secrets.BINTRAY_APIKEY }}
run: |
yarn install --frozen-lockfile
rm -rf node_modules/react-native-secure-element/examples
yarn detox build -c android.release
- name: Android test
timeout-minutes: 10
if: "!contains(github.event.head_commit.message, '[skip ci]')"
working-directory: ./examples/RNSecureElementTester
continue-on-error: true
run: |
mkdir -p artifacts
export PATH=$PATH:$ANDROID_HOME/platform-tools
$ANDROID_HOME/emulator/emulator @emu &
adb wait-for-device; adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'; adb shell wm dismiss-keyguard
adb shell locksettings set-pin 1111
yarn detox test -c android.release
- name: Provide videos of failed E2E tests
if: "!contains(github.event.head_commit.message, '[skip ci]')"
uses: actions/upload-artifact@master
continue-on-error: true
with:
name: android-failing-e2e-videos
path: ./examples/RNSecureElementTester/artifacts/