File tree Expand file tree Collapse file tree 5 files changed +19
-162
lines changed
src/androidTest/java/com/test Expand file tree Collapse file tree 5 files changed +19
-162
lines changed Original file line number Diff line number Diff line change 11name : Build jsc-android and test
22
3- on : [push]
3+ on : [push, pull_request ]
44
55jobs :
66 build :
2727 - name : Install Android packages
2828 run : |
2929 sdkmanager \
30- "lldb;3.0" \
3130 "cmake;3.10.2.4988404"
3231 shell : bash
3332 - name : Build
4443 mv dist.unstripped archive/
4544 shell : bash
4645
47- - uses : actions/upload-artifact@master
46+ - uses : actions/upload-artifact@v2
4847 with :
4948 name : archive
5049 path : archive
@@ -57,33 +56,15 @@ jobs:
5756 steps :
5857 - uses : actions/checkout@v1
5958
60- - uses : actions/download-artifact@master
59+ - uses : actions/download-artifact@v2
6160 with :
6261 name : archive
6362 path : archive
6463
65- - name : Launch AVD
66- run : |
67- source scripts/android-setup.sh
68- export PATH="${ANDROID_HOME}/emulator:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}"
69- export AVD_PACKAGES="system-images;android-${ANDROID_SDK_TARGET_API_LEVEL};google_apis;${AVD_ABI}"
70- sdkmanager "${AVD_PACKAGES}"
71- createAVD
72- launchAVD &
73- shell : bash
74-
75- - name : Wait AVD
76- run : |
77- export PATH="${ANDROID_HOME}/emulator:${ANDROID_HOME}/tools:${ANDROID_HOME}/tools/bin:${ANDROID_HOME}/platform-tools:${PATH}"
78- source scripts/android-setup.sh
79- set +e +o pipefail
80- waitForAVD
81- shell : bash
82-
8364 - name : Run test
84- run : |
85- mv archive/dist .
86- cd test
87- yarn
88- cd android && ./gradlew assembleDebug assembleAndroidTest connectedAndroidTest
89- shell : bash
65+ uses : reactivecircus/android-emulator-runner@v2
66+ with :
67+ api-level : 16
68+ arch : x86
69+ disable-animations : false
70+ script : mv archive/dist . && cd test && yarn && cd android && ./gradlew assembleRelease assembleAndroidTest connectedAndroidTest
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -164,6 +164,9 @@ android {
164164 proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
165165 }
166166 }
167+
168+ testBuildType ' release'
169+
167170 // applicationVariants are e.g. debug, release
168171 applicationVariants. all { variant ->
169172 variant. outputs. each { output ->
@@ -192,10 +195,10 @@ dependencies {
192195 implementation jscFlavor
193196 }
194197
195- androidTestImplementation ' androidx.test:core:1.1 .0' ;
196- androidTestImplementation ' androidx.test.ext:junit:1.1.0 ' ;
197- androidTestImplementation ' androidx.test.espresso:espresso-core:3.1 .0'
198- androidTestImplementation ' androidx.test.espresso:espresso-intents:3.1 .0' ;
198+ androidTestImplementation ' androidx.test:core:1.3 .0' ;
199+ androidTestImplementation ' androidx.test.ext:junit:1.1.2 ' ;
200+ androidTestImplementation ' androidx.test.espresso:espresso-core:3.3 .0'
201+ androidTestImplementation ' androidx.test.espresso:espresso-intents:3.3 .0' ;
199202}
200203
201204// Run this once to be able to run the application with BUCK
Original file line number Diff line number Diff line change 77
88import android .view .View ;
99
10- import androidx .test .core .app .ActivityScenario ;
1110import androidx .test .espresso .ViewAction ;
1211import androidx .test .espresso .UiController ;
1312import androidx .test .espresso .PerformException ;
1413import androidx .test .espresso .util .TreeIterables ;
1514import androidx .test .espresso .util .HumanReadables ;
1615import androidx .test .filters .LargeTest ;
16+ import androidx .test .ext .junit .rules .ActivityScenarioRule ;
1717import androidx .test .ext .junit .runners .AndroidJUnit4 ;
1818
1919import java .util .concurrent .TimeoutException ;
2929@ LargeTest
3030public class SimpleTest {
3131
32- @ Before
33- public void launchActivity () {
34- ActivityScenario .launch (MainActivity .class );
35- }
32+ @ Rule public ActivityScenarioRule <MainActivity > activityScenarioRule
33+ = new ActivityScenarioRule <>(MainActivity .class );
3634
3735 @ Test
3836 public void testIfAppLoads () {
You can’t perform that action at this time.
0 commit comments