forked from lathonez/clicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (64 loc) · 2.04 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
#
# Configuration
#
sudo: required
dist: trusty
notifications:
email: true
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- google-chrome
packages:
- google-chrome-stable
- lib32stdc++6
- lib32z1
branches:
only:
- master
- rc0
#
# Build Lifecycle:
#
before_install:
- nvm install node
- nvm use node
- npm install -g cordova ionic angular-cli
- ionic state clear
install: npm install
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
script:
- ng test --watch=false --code-coverage # unit tests
- npm run ionic:build # ionic build
# Serve with python as ionic serve needs interaction
- cd www && python -m SimpleHTTPServer 8100 >> python_serve.log 2>&1 &
- npm run e2e # run e2e tests against ionic
after_failure:
- cat $TRAVIS_BUILD_DIR/python_serve.log
- cat $TRAVIS_BUILD_DIR/ionic_serve.log
after_success:
# Send coverage info off to cloud ppl
- ./node_modules/.bin/codecov
before_deploy:
# start install android
- wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
- tar -xzvf android-sdk_r24.2-linux.tgz
- echo "y" | ./android-sdk-linux/tools/android update sdk --no-ui --filter android-23,build-tools-23.0.1
- export ANDROID_HOME=${PWD}/android-sdk-linux
# license fail workaround: http://stackoverflow.com/questions/38096225/automatically-accept-all-sdk-licences
- mkdir -p ${ANDROID_HOME}/licenses
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "${ANDROID_HOME}/licenses/android-sdk-license"
- echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "${ANDROID_HOME}/licenses/android-sdk-preview-license"
# end install android
- ionic state restore
- ionic platform add android
- ionic build android
# `ionic build android` wraps `cordova build android`, which gives a legit exit code if it fails. Ionic does not; test apk exists.
- ls ./platforms/android/build/outputs/apk/android*.apk
deploy:
provider: script
script: .travis/deploy.sh
skip_cleanup: true