forked from apla/me.apla.cordova.app-preferences
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
64 lines (61 loc) · 2.26 KB
/
circle.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# Build configuration for Circle CI
#
machine:
node:
version: 6
java:
version: 'oraclejdk8'
environment:
ANDROID_HOME: /usr/local/android-sdk-linux
ANDROID_NDK_HOME: $ANDROID_NDK
NODE_ENV: test
NODE_PATH: $NODE_PATH:$HOME/$CIRCLE_PROJECT_REPONAME/node_modules:$HOME/$CIRCLE_PROJECT_REPONAME/node_modules/cordova/node_modules
PATH: $PATH:$HOME/$CIRCLE_PROJECT_REPONAME/node_modules/.bin
dependencies:
cache_directories:
- ~/.android
- ~/android
- ~/.gradle
override:
- npm install
- cordova create app-preferences-app
- echo test plugin within cordova app
- cordova platform add android:
pwd: app-preferences-app
- cordova plugin add https://github.com/apla/me.apla.cordova.app-preferences:
pwd: app-preferences-app
- cordova plugin add cordova-plugin-device:
pwd: app-preferences-app
- cordova -d prepare:
pwd: app-preferences-app
- (cordova -d build --debug --emulator --gradleArg=--debug android || exit 0):
pwd: app-preferences-app
- (cordova -d build --debug --emulator --gradleArg=-Dorg.gradle.daemon=false android || exit 0):
pwd: app-preferences-app
pre:
- ( sleep 5 && while [ 1 ]; do sleep 1; echo y; done ) | android update sdk --no-ui --all --filter tools,platform-tools,build-tools-25.0.3,android-22,android-25,extra-google-m2repository,extra-google-google_play_services
# - chmod +x gradlew
# - ANDROID_HOME=/usr/local/android-sdk-linux ./gradlew dependencies
test:
pre:
- emulator -avd circleci-android22 -no-audio -no-window:
background: true
parallel: true
- circle-android wait-for-boot
override:
- echo running jasmine test
- jasmine:
pwd: bin
- (if [ ! -f app-settings.json ]; then exit 0; fi):
pwd: app-preferences-app
- cp plugins/cordova-plugin-app-preferences/src/test.js www/js/apppreferences-test.js:
pwd: app-preferences-app
- patch -p0 -i plugins/cordova-plugin-app-preferences/src/test.patch:
pwd: app-preferences-app
- cordova prepare:
pwd: app-preferences-app
- cordova -d build --debug --emulator android:
pwd: app-preferences-app
- node ../bin/test-server.js android circleci-android22:
pwd: app-preferences-app