Skip to content

Commit c0df7f1

Browse files
author
Krzysztof Borowy
committed
chore: e2e setup
1 parent 970eaa5 commit c0df7f1

File tree

3 files changed

+39
-36
lines changed

3 files changed

+39
-36
lines changed

.circleci/config.yml

Lines changed: 37 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ default config for macOS: &macos_defaults
2424
<<: *defaults
2525
resource_class: 'medium'
2626
macos:
27-
xcode: '11.7.0'
27+
xcode: '11.0.0'
2828

2929
default config for android apk builds: &android_defaults
3030
<<: *defaults
@@ -59,12 +59,12 @@ save brew cache for android: &cache_save_brew_android
5959
paths:
6060
- /usr/local/Homebrew
6161
- ~/Library/Caches/Homebrew
62-
key: legacy-brew-cache-node12-{{ arch }}-android
62+
key: legacy-brew-cache-node12-{{ arch }}-android-v1
6363

6464
restore brew cache for android: &cache_restore_brew_android
6565
name: Restoring Brew cache for android
6666
keys:
67-
- legacy-brew-cache-node12-{{ arch }}-android
67+
- legacy-brew-cache-node12-{{ arch }}-android-v1
6868

6969
# yarn
7070
save yarn cache: &cache_save_yarn
@@ -208,13 +208,16 @@ jobs:
208208
command: |
209209
echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
210210
echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV
211-
echo 'export PATH="$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$ANDROID_SDK_ROOT/tools/bin:$PATH"' >> $BASH_ENV
211+
echo 'export PATH="$ANDROID_SDK_ROOT/emulator:$ANDROID_SDK_ROOT/tools:$ANDROID_SDK_ROOT/platform-tools:$PATH"' >> $BASH_ENV
212212
echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV
213-
echo 'export JAVA_HOME=/Library/Java/Home' >> $BASH_ENV
213+
echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> $BASH_ENV
214214
source $BASH_ENV
215215
216216
# Android tools
217217
- restore-cache: *cache_restore_brew_android
218+
- run:
219+
name: Create repos file
220+
command: mkdir -p ~/.android && touch ~/.android/repositories.cfg
218221
- run:
219222
name: Install Android SDK tools
220223
command: |
@@ -224,11 +227,11 @@ jobs:
224227
name: Install Android emulator
225228
shell: /bin/bash -e
226229
command: |
227-
yes | sdkmanager "platform-tools" "tools" 1> /dev/null
228-
yes | sdkmanager "platforms;android-28" "system-images;android-21;google_apis;x86" 1> /dev/null
229-
yes | sdkmanager "emulator" --channel=3 1> /dev/null
230-
yes | sdkmanager "build-tools;28.0.3" 1> /dev/null
231-
yes | sdkmanager --licenses 1> /dev/null
230+
yes | sdkmanager "platform-tools" "tools" >/dev/null
231+
yes | sdkmanager "platforms;android-28" "system-images;android-28;default;x86_64" >/dev/null
232+
yes | sdkmanager "emulator" --channel=3 >/dev/null
233+
yes | sdkmanager "build-tools;28.0.3" >/dev/null
234+
yes | sdkmanager --licenses >/dev/null
232235
yes | sdkmanager --list
233236
- run:
234237
name: ADB start/stop
@@ -240,12 +243,11 @@ jobs:
240243
- run:
241244
name: Create emulator
242245
command: |
243-
avdmanager create avd \
244-
--force \
246+
avdmanager create avd --force \
245247
-n "Emu_E2E" \
246-
-k "system-images;android-21;google_apis;x86" \
247-
-g "google_apis" \
248-
-d "Nexus 4"
248+
-k "system-images;android-28;default;x86_64" \
249+
-g "default" \
250+
-d "pixel"
249251
- run:
250252
name: Start emulator in background
251253
background: true
@@ -287,29 +289,28 @@ workflows:
287289
"Testing":
288290
jobs:
289291
- "Setup environment"
290-
- "Test: lint":
291-
requires:
292-
- "Setup environment"
293-
- "Test: flow":
294-
requires:
295-
- "Setup environment"
296-
- "Test: iOS e2e":
297-
requires:
298-
- "Test: lint"
299-
- "Test: flow"
292+
# - "Test: lint":
293+
# requires:
294+
# - "Setup environment"
295+
# - "Test: flow":
296+
# requires:
297+
# - "Setup environment"
298+
# - "Test: iOS e2e":
299+
# requires:
300+
# - "Test: lint"
301+
# - "Test: flow"
300302
- "Build: Android release apk":
301303
requires:
302-
- "Test: lint"
303-
- "Test: flow"
304-
- "Release":
305-
requires:
306-
- "Test: iOS e2e"
307-
- "Build: Android release apk"
308-
filters:
309-
branches:
310-
only: master
311-
# - "Test: Android e2e":
312-
# requires:
304+
- "Setup environment"
313305
# - "Test: lint"
314306
# - "Test: flow"
307+
# - "Release":
308+
# requires:
309+
# - "Test: iOS e2e"
315310
# - "Build: Android release apk"
311+
# filters:
312+
# branches:
313+
# only: master
314+
- "Test: Android e2e":
315+
requires:
316+
- "Build: Android release apk"

example/android/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
android:icon="@mipmap/ic_launcher"
1111
android:roundIcon="@mipmap/ic_launcher_round"
1212
android:allowBackup="false"
13+
android:usesCleartextTraffic="true"
1314
android:theme="@style/AppTheme">
1415
<activity
1516
android:name=".MainActivity"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@
105105
},
106106
"android": {
107107
"binaryPath": "example/android/app/build/outputs/apk/release/app-release.apk",
108+
"testBinaryPath": "example/android/app/build/outputs/apk/androidTest/release/app-release-androidTest.apk",
108109
"build": ".circleci/scripts/run_android_e2e.sh",
109110
"type": "android.emulator",
110111
"name": "Emu_E2E"

0 commit comments

Comments
 (0)