forked from NativeScript/sample-Groceries
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (80 loc) · 2.47 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
env:
global:
- ANDROID_PACKAGE='groceries.apk'
- ANDROID_PACKAGE_FOLDER=$TRAVIS_BUILD_DIR/platforms/android/app/build/outputs/apk/debug/
- ANDROID_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER/$ANDROID_PACKAGE?overwrite=true"
- IOS_PACKAGE='sampleGroceries.zip'
- IOS_APP_NAME='sampleGroceries.app'
- IOS_PACKAGE_FOLDER=$TRAVIS_BUILD_DIR/platforms/ios/build/emulator
- IOS_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER/$IOS_PACKAGE?overwrite=true"
branches:
only:
- master
matrix:
include:
- stage: "Lint"
language: node_js
os: linux
node_js: "8"
install: true
script: npm i && npm run tslint
- stage: "Build"
os: osx
env:
- BuildiOS="11"
- Xcode="9.2"
osx_image: xcode9.2
language: node_js
node_js: "8"
jdk: oraclejdk8
script:
- tns build ios
- cd $IOS_PACKAGE_FOLDER && zip -r $IOS_PACKAGE $IOS_APP_NAME
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $IOS_SAUCE_STORAGE --data-binary @$IOS_PACKAGE_FOLDER/$IOS_PACKAGE"
- language: android
env:
- BuildAndroid="26"
os: linux
jdk: oraclejdk8
before_install: nvm install 8.9.1
script:
- tns build android
- "curl -u $SAUCE_USER:$SAUCE_KEY -X POST -H 'Content-Type: application/octet-stream' $ANDROID_SAUCE_STORAGE --data-binary @$ANDROID_PACKAGE_FOLDER/app-debug.apk"
- stage: "UI Tests"
env:
- AndroidEmulator="23"
language: node_js
os: linux
node_js: "8"
script:
- npm i -g appium
- npm i
- travis_retry npm run e2e -- --runType android23 --sauceLab --reuseDevice --appPath $ANDROID_PACKAGE
- os: linux
env:
- iOS="11"
language: node_js
node_js: "8"
script:
- npm i -g appium
- npm i
- travis_wait travis_retry npm run e2e -- --runType sim.iPhone6.iOS100 --sauceLab --reuseDevice --appPath $IOS_PACKAGE
android:
components:
- tools
- platform-tools
- build-tools-27.0.3
- 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:
- echo no | npm install -g nativescript
- tns usage-reporting disable
- tns error-reporting disable