File tree 5 files changed +19
-162
lines changed
src/androidTest/java/com/test 5 files changed +19
-162
lines changed Original file line number Diff line number Diff line change 1
1
name : Build jsc-android and test
2
2
3
- on : [push]
3
+ on : [push, pull_request ]
4
4
5
5
jobs :
6
6
build :
27
27
- name : Install Android packages
28
28
run : |
29
29
sdkmanager \
30
- "lldb;3.0" \
31
30
"cmake;3.10.2.4988404"
32
31
shell : bash
33
32
- name : Build
44
43
mv dist.unstripped archive/
45
44
shell : bash
46
45
47
- - uses : actions/upload-artifact@master
46
+ - uses : actions/upload-artifact@v2
48
47
with :
49
48
name : archive
50
49
path : archive
@@ -57,33 +56,15 @@ jobs:
57
56
steps :
58
57
- uses : actions/checkout@v1
59
58
60
- - uses : actions/download-artifact@master
59
+ - uses : actions/download-artifact@v2
61
60
with :
62
61
name : archive
63
62
path : archive
64
63
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
-
83
64
- 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 {
164
164
proguardFiles getDefaultProguardFile(" proguard-android.txt" ), " proguard-rules.pro"
165
165
}
166
166
}
167
+
168
+ testBuildType ' release'
169
+
167
170
// applicationVariants are e.g. debug, release
168
171
applicationVariants. all { variant ->
169
172
variant. outputs. each { output ->
@@ -192,10 +195,10 @@ dependencies {
192
195
implementation jscFlavor
193
196
}
194
197
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' ;
199
202
}
200
203
201
204
// Run this once to be able to run the application with BUCK
Original file line number Diff line number Diff line change 7
7
8
8
import android .view .View ;
9
9
10
- import androidx .test .core .app .ActivityScenario ;
11
10
import androidx .test .espresso .ViewAction ;
12
11
import androidx .test .espresso .UiController ;
13
12
import androidx .test .espresso .PerformException ;
14
13
import androidx .test .espresso .util .TreeIterables ;
15
14
import androidx .test .espresso .util .HumanReadables ;
16
15
import androidx .test .filters .LargeTest ;
16
+ import androidx .test .ext .junit .rules .ActivityScenarioRule ;
17
17
import androidx .test .ext .junit .runners .AndroidJUnit4 ;
18
18
19
19
import java .util .concurrent .TimeoutException ;
29
29
@ LargeTest
30
30
public class SimpleTest {
31
31
32
- @ Before
33
- public void launchActivity () {
34
- ActivityScenario .launch (MainActivity .class );
35
- }
32
+ @ Rule public ActivityScenarioRule <MainActivity > activityScenarioRule
33
+ = new ActivityScenarioRule <>(MainActivity .class );
36
34
37
35
@ Test
38
36
public void testIfAppLoads () {
You can’t perform that action at this time.
0 commit comments