-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
98 lines (93 loc) · 3.29 KB
/
.travis.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
branches:
only:
- master
env:
global:
- ANDROID_PACKAGE='demo-debug.apk'
- ANDROID_PACKAGE_FOLDER=$TRAVIS_BUILD_DIR/demo/platforms/android/app/build/outputs/apk
- ANDROID_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER/$ANDROID_PACKAGE?overwrite=true"
- IOS_PACKAGE='demo.zip'
- IOS_PACKAGE_FOLDER=$TRAVIS_BUILD_DIR/demo/platforms/ios/build/emulator
- IOS_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER/$IOS_PACKAGE?overwrite=true"
matrix:
include:
- stage: "Lint"
language: node_js
os: linux
node_js: "6"
script: cd src && npm run ci.tslint && cd ../demo && npm run ci.tslint && cd ../demo-angular && npm run ci.tslint
- stage: "WebPack and Build"
os: osx
env:
- WebpackiOS="11"
osx_image: xcode9.2
language: node_js
node_js: "6"
jdk: oraclejdk8
script: cd demo && npm run build.plugin && npm i && tns build ios --env.uglify && cd ../demo-angular && npm run build.plugin && npm i && tns build ios --env.uglify --env.aot
- language: android
os: linux
env:
- WebpackAndroid="26"
jdk: oraclejdk8
before_install: nvm install 6.10.3
script: cd demo && npm run build.plugin && npm i && tns build android --env.uglify --env.snapshot && cd ../demo-angular && npm run build.plugin && npm i && tns build android --env.uglify --env.snapshot --env.aot
- language: android
env:
- BuildAndroid="26"
os: linux
jdk: oraclejdk8
before_install: nvm install 6.10.3
script:
- cd demo && npm run ci.android.build && cd ../demo-angular && npm run ci.android.build
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE --data-binary @$ANDROID_PACKAGE_FOLDER/$ANDROID_PACKAGE"
- os: osx
env:
- BuildiOS="11"
- Xcode="9.2"
osx_image: xcode9.1
language: node_js
node_js: "6"
jdk: oraclejdk8
script:
- cd demo && npm run ci.ios.build && cd ../demo-angular && npm run ci.ios.build
- cd $IOS_PACKAGE_FOLDER && zip -r $IOS_PACKAGE demo.app
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE --data-binary @$IOS_PACKAGE_FOLDER/$IOS_PACKAGE"
- stage: "UI Tests"
env:
- Android="23"
language: node_js
os: linux
node_js: "6"
script:
- npm i -g appium
- cd demo && npm i
- travis_retry npm run e2e -- --runType android23 --sauceLab --reuseDevice --appPath $ANDROID_PACKAGE
- os: linux
env:
- iOS="10"
language: node_js
node_js: "6"
script:
- npm i -g appium
- cd demo && npm i
- travis_wait travis_retry npm run e2e -- --runType sim103iPhone6 --sauceLab --reuseDevice --appPath $IOS_PACKAGE
android:
components:
- tools
- platform-tools
- build-tools-26.0.1
- android-26
- android-23
- extra-android-m2repository
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- .nvm
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
install:
- npm install -g nativescript
- tns usage-reporting disable
- tns error-reporting disable