forked from appium/java-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
50 lines (43 loc) · 1.64 KB
/
azure-pipelines.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
# Gradle
# Build your Java project and run tests with Gradle using a Gradle wrapper script.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/java
pool:
vmImage: 'macOS 10.13'
variables:
ANDROID_EMU_NAME: test
ANDROID_EMU_ABI: x86
ANDROID_EMU_TARGET: android-27
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.x'
- script: |
echo "Configuring Environment"
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;$(ANDROID_EMU_TARGET);google_apis;$(ANDROID_EMU_ABI)'
echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n "$(ANDROID_EMU_NAME)" -k 'system-images;$(ANDROID_EMU_TARGET);google_apis;$(ANDROID_EMU_ABI)' --force
echo $ANDROID_HOME/emulator/emulator -list-avds
echo "Starting emulator"
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -no-snapshot > /dev/null 2>&1 &
$ANDROID_HOME/platform-tools/adb wait-for-device
while [[ $? -ne 0 ]]; do sleep 1; $ANDROID_HOME/platform-tools/adb shell pm list packages; done;
$ANDROID_HOME/platform-tools/adb devices
echo "Emulator started"
npm config delete prefix
npm config set prefix $NVM_DIR/versions/node/v8.12.0
npm install -g appium@beta
appium --version
node --version
java -version
which node
npm root -g
- task: Gradle@2
inputs:
gradleWrapperFile: 'gradlew'
gradleOptions: '-Xmx3072m'
javaHomeOption: 'JDKVersion'
jdkVersionOption: '1.8'
jdkArchitectureOption: 'x64'
publishJUnitResults: true
tasks: 'build'
options: 'xcuiTest uiAutomationTest -x test -x signArchives'