Skip to content

chore(travis-ci): simplify to lint and compile the package #1681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
103 changes: 8 additions & 95 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,95 +1,8 @@
env:
global:
- NODE_VERSION=8
- EMULATOR_API_LEVEL=23
- ANDROID_VERSION=28
- ANDROID_BUILD_TOOLS_VERSION=28.0.3
- ANDROID_ABI=armeabi-v7a
- EMULATOR_NAME=test
- ANDROID_TAG=google_apis

matrix:
include:
- stage: "Lint"
language: node_js
os: linux
before_install:
- nvm install $NODE_VERSION
script:
- cd nativescript-angular
- npm install
- npm run tslint
- stage: "Build"
os: osx
env:
- Build="iOS"
osx_image: xcode9.3
language: node_js
node_js: "8"
jdk: oraclejdk8
before_install:
- cd nativescript-angular
- npm install
- cd ../tests
- npm install
- cd ..
script:
- cd nativescript-angular
- npm run ngc
- cd ../tests
- tns build ios
- language: android
node_js: "8"
os: linux
env:
- Build="Android"
jdk: oraclejdk8
before_install:
- echo no | android create avd --force -n $EMULATOR_NAME -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI --tag $ANDROID_TAG -c 12M
- QEMU_AUDIO_DRV=none emulator -avd $EMULATOR_NAME -no-window &
- nvm install $NODE_VERSION
- cd nativescript-angular
- npm install
- cd ../tests
- npm install
- cd ..
- android-wait-for-emulator
- adb shell input keyevent 82 &
script:
- cd nativescript-angular
- npm run ngc
- cd ../tests
- tns build android

android:
components:
- tools
- platform-tools
- android-$ANDROID_VERSION
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$EMULATOR_API_LEVEL
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
# Specify at least one system image,
# if you need to run emulator(s) during your tests
- sys-img-armeabi-v7a-google_apis-$EMULATOR_API_LEVEL
licenses:
- ".+"

before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
directories:
- .nvm
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/

install:
- nvm install $NODE_VERSION
- npm install -g typings
- wget -O ./nativescript.tgz "https://s3.amazonaws.com/nativescript-ci/build_result/nativescript.tgz"
- npm install -g nativescript.tgz --ignore-scripts
- tns usage-reporting disable
- tns error-reporting disable
language: node_js
node_js:
- "node"
script:
- cd nativescript-angular
- npm install
- npm run tslint
- npm pack