-
Notifications
You must be signed in to change notification settings - Fork 146
134 lines (108 loc) · 4.03 KB
/
react_native.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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
name: React Native
on:
push:
branches:
- main
- develop
- release/*
- build
pull_request:
branches:
- main
- develop
- release/*
jobs:
android:
if: ${{ false }} # disable for now
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "8"
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.7.0
- name: Cache pnpm modules
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: actions/setup-node@v2
with:
node-version: "16"
- uses: pnpm/action-setup@v2.0.1
with:
version: 7.6.0
- run: npm install -g yarn
- name: Build @hashgraph/sdk
run: task build
- name: Install detox
run: npm install -g detox-cli
- name: AVD
run: |
brew install android-platform-tools
pnpm install -g envinfo detox-cli && envinfo
echo yes | $ANDROID_HOME/tools/bin/sdkmanager --channel=0 --verbose "system-images;android-28;default;x86_64"
$ANDROID_HOME/tools/bin/avdmanager --verbose create avd --force --name "Nexus6P" --package "system-images;android-28;default;x86_64" --sdcard 200M --device 11
adb start-server
- name: Build
working-directory: examples/react-native-example
run: |
../../node_modules/.bin/yalc add "@hashgraph/sdk"
yarn
detox build --configuration android
- name: Test
working-directory: examples/react-native-example
run: detox test --configuration android
ios:
if: ${{ false }} # disable for now
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: "8"
- name: Install Task
uses: arduino/setup-task@v1
with:
version: 3.7.0
- name: Cache pnpm modules
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- uses: actions/setup-node@v2
with:
node-version: "16"
- uses: pnpm/action-setup@v2.0.1
with:
version: 7.6.0
- run: npm install -g yarn
- name: Build @hashgraph/sdk
run: task build
- name: Install detox
run: npm install -g detox-cli
- name: Build
working-directory: examples/react-native-example
run: |
brew tap wix/brew
brew install applesimutils
yalc add "@hashgraph/sdk"
yarn
detox build --configuration ios
- name: Test
working-directory: examples/react-native
run: |
detox test --configuration ios