-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
59 lines (59 loc) · 2.15 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
# inspired by https://thesabbir.com/continuous-integration-with-cordova-android-applications/
notifications:
email: false
language: android
sudo: required
group: stable
dist: precise
services:
docker
android:
components:
- build-tools-23.0.3 # Specify your build tools version
- android-23 # Android Platform Target
env: # Envirement Variables
- TRAVIS_NODE_VERSION="v5.6.0"
global:
before_install:
# Commands to excecute before install
- echo "Before install stage"
install:
# Specify what and how to install
- echo "Install stage"
# Install the correct node version using nvm.
# see: http://austinpray.com/ops/2015/09/20/change-travis-node-version.html
- rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
- sudo apt-get install -y inkscape
- npm install -g cordova ionic bower gulp cordova-icon
- npm i # for installing gulp and other stuff
- ionic state restore
- ionic prepare
- bower update
before_script:
# Commands to excecute before running tests
- echo "Before script stage"
script:
# Run tests
- echo "Running tests"
#- cordova build
- echo "Starting build"
- docker/build
#- cordova run browser
- echo "Running unit tests"
- npm test
after_success:
# You can do thing after success
- echo "Build success"
- echo "now deploying to docker"
- docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
# TODO: versioneering!
# TODO: extract docker path from some central point?
- docker pull amos2016groupone/amos-ss16-proj1
- docker build -t amos2016groupone/amos-ss16-proj1 docker/
- docker push amos2016groupone/amos-ss16-proj1
after_failure:
# What if your test fails?
- echo "After failure stage"
after_script:
# Do things anyway after script/test pass or not
- echo "After script stage"