Skip to content

Commit 6134e3c

Browse files
Migrate CI to Azure for both iOS and Android (appium#1081)
* get list of avd in azure mac host * get list of avd in azure mac host * mount emulator * mount emulator * Execute iOS and Android tests * Remove travis integration * Fix review comments * move variables as per azure docs * switch to azure syntax * adding travis back
1 parent 67112e6 commit 6134e3c

File tree

2 files changed

+20
-5
lines changed

2 files changed

+20
-5
lines changed

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ sudo: required
33
matrix:
44
include:
55
- language: android
6-
install: true
76
install:
87
- echo y | android update sdk -u -a -t tools
98
- echo y | android update sdk -u -a -t platform-tools
@@ -36,12 +35,12 @@ matrix:
3635
- ./gradlew --version
3736
- echo y |adb devices
3837
script:
39-
- ./gradlew clean build uiAutomationTest -x test -x signArchives
38+
- ./gradlew clean build uiAutomationTest -x test -x signArchives
4039

4140
before_cache:
4241
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
4342
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
4443
cache:
4544
directories:
4645
- $HOME/.gradle/caches/
47-
- $HOME/.gradle/wrapper/
46+
- $HOME/.gradle/wrapper/

azure-pipelines.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,29 @@
66
pool:
77
vmImage: 'macOS 10.13'
88

9+
variables:
10+
ANDROID_EMU_NAME: test
11+
ANDROID_EMU_ABI: x86
12+
ANDROID_EMU_TARGET: android-27
13+
914
steps:
1015
- task: NodeTool@0
1116
inputs:
1217
versionSpec: '8.x'
1318

1419
- script: |
15-
echo Configuring Environment
20+
echo "Configuring Environment"
21+
echo "y" | $ANDROID_HOME/tools/bin/sdkmanager --install 'system-images;$(ANDROID_EMU_TARGET);google_apis;$(ANDROID_EMU_ABI)'
22+
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
23+
echo $ANDROID_HOME/emulator/emulator -list-avds
24+
25+
echo "Starting emulator"
26+
nohup $ANDROID_HOME/emulator/emulator -avd "$(ANDROID_EMU_NAME)" -no-snapshot > /dev/null 2>&1 &
27+
$ANDROID_HOME/platform-tools/adb wait-for-device
28+
while [[ $? -ne 0 ]]; do sleep 1; $ANDROID_HOME/platform-tools/adb shell pm list packages; done;
29+
$ANDROID_HOME/platform-tools/adb devices
30+
echo "Emulator started"
31+
1632
npm config delete prefix
1733
npm config set prefix $NVM_DIR/versions/node/v8.12.0
1834
npm install -g appium@beta
@@ -31,4 +47,4 @@ steps:
3147
jdkArchitectureOption: 'x64'
3248
publishJUnitResults: true
3349
tasks: 'build'
34-
options: 'xcuiTest -x test -x signArchives'
50+
options: 'xcuiTest uiAutomationTest -x test -x signArchives'

0 commit comments

Comments
 (0)