-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path.travis.yml
89 lines (83 loc) · 2.62 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
# Only run on the master branch
branches:
only:
- master
# Env variables
env:
global:
- ANDROID_PACKAGE='nativescriptvueuitests-debug.apk'
- ANDROID_PACKAGE_FOLDER=$TRAVIS_BUILD_DIR/platforms/android/build/outputs/apk
- ANDROID_SAUCE_STORAGE="https://saucelabs.com/rest/v1/storage/$SAUCE_USER/$ANDROID_PACKAGE?overwrtie=true"
- IOS_PACKAGE='nativescriptvueuitests.zip'
- 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"
# Android requirements
android:
components:
- tools
- platform-tools
- build-tools-25.0.2
- android-25
- extra-android-m2repository
# Caching configuration
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- .nvm
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
# Install steps (Install nativescript and disable reporting)
install:
- npm install -g nativescript --ignore-scripts
- tns usage-reporting disable
- tns error-reporting disable
# The build matrix
matrix:
include:
- stage: "Build"
env:
- BuildAndroid="25"
language: android
os: linux
jdk: oraclejdk8
before_install: nvm install 8.6.0
script:
- npm run 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="10.3"
- Xcode="8.3"
osx_image: xcode8.3
language: node_js
node_js: "8"
jdk: oraclejdk8
script:
- npm run ios.build
- cd $IOS_PACKAGE_FOLDER && zip -r $IOS_PACKAGE nativescriptvueuitests.app/ &> /dev/null
- echo $SAUCE_USER:$SAUCE_KEY
- "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: "Screenshots"
env:
- Android="23"
language: node_js
os: linux
node_js: "8"
script:
- npm install -g appium
- npm install
- appium &
- travis_retry npm run appium -- --runType=android23 --sauceLab=true --appPath=$ANDROID_PACKAGE
- npm run deploy
- os: linux
env:
- iOS="10"
language: node_js
node_js: "8"
script:
- npm install -g appium
- npm install
- appium &
- travis_wait travis_retry npm run appium -- --runType=ios-simulator103iPhone6 --sauceLab=true --appPath=$IOS_PACKAGE
- npm run deploy