71 lines
1.8 KiB
YAML
71 lines
1.8 KiB
YAML
#
|
|
# 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 --lts
|
|
- node --version
|
|
- npm install -g cordova@6.4.0 ionic@3.2.0
|
|
|
|
install: npm install
|
|
|
|
before_script:
|
|
- export DISPLAY=:99.0
|
|
- sh -e /etc/init.d/xvfb start
|
|
|
|
script:
|
|
- npm run test-ci # unit tests
|
|
- npm run e2e # run e2e tests against ionic
|
|
|
|
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
|
|
- cordova 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
|
|
# test a browser prod build with ionic (#236)
|
|
- cordova build browser --prod
|
|
- ls ./platforms/browser/build/package.zip
|
|
|
|
deploy:
|
|
provider: script
|
|
script: .travis/deploy.sh
|
|
skip_cleanup: true
|