This repository has been archived by the owner on Sep 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
66 lines (55 loc) · 2.05 KB
/
android.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
name: Android
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Checkout project
uses: actions/checkout@v1
- name: Specify node version
uses: actions/setup-node@v1
with:
node-version: 12
- name: Use specific Java version for sdkmanager to work
uses: joschi/setup-jdk@v1
with:
java-version: 'openjdk8'
architecture: 'x64'
- name: Download Android Emulator Image
run: |
echo y | sudo $ANDROID_HOME/tools/bin/sdkmanager "system-images;android-28;google_apis;x86_64" > /dev/null
$ANDROID_HOME/tools/bin/avdmanager -s create avd -n emu -k "system-images;android-28;google_apis;x86_64" -b "x86_64" -c 1G -d 7 -f
- name: Install node_modules
run: |
yarn install --frozen-lockfile
- name: Fastlane setup
run: |
sudo gem install fastlane -NV
- name: Build
working-directory: packages/mobile/android
env:
KEYSTORE: ${{ secrets.ANDROID_KEYSTORE }}
AT: ${{ secrets.ANDROID_TOKEN }}
android_keystore_pw: ${{ secrets.android_keystore_pw }}
android_pw: ${{ secrets.android_pw }}
android_alias: ${{ secrets.android_alias }}
run: |
echo "$KEYSTORE" | xxd -r -p - > app/release.keystore
echo $AT > ~/play_api_key_rn_spaceviewer.json
fastlane android detox
rm -f ~/play_api_key_rn_spaceviewer.json
rm -f app/release.keystore
- name: Test
timeout-minutes: 10
run: |
export PATH=$PATH:$ANDROID_HOME/platform-tools
$ANDROID_HOME/emulator/emulator @emu -no-boot-anim &
adb wait-for-device; adb shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done;'; adb shell wm dismiss-keyguard
mkdir -p ./artifacts
yarn workspace mobile test-detox-android-release --record-videos all
- uses: actions/upload-artifact@v1
if: failure()
with:
name: e2e-test-videos
path: packages/mobile/artifacts