Skip to content

Commit

Permalink
Merge pull request #242 from eozd/travis-test
Browse files Browse the repository at this point in the history
Improve .travis.yml to speed up Travis tests
  • Loading branch information
eozd authored Oct 27, 2017
2 parents 8c8afca + f41c89e commit 299d64a
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ matrix:
env:
- DJANGO=1.4.1

before_install:
- git fetch https://github.com/bounswe/bounswe2017group10.git master:master
- bash ./any_changes_in.sh backend || travis_terminate 0

install:
- cd Atlas/backend
- virtualenv atlasenv
Expand All @@ -25,6 +29,9 @@ matrix:
# FRONTEND
- language: python
python: 3.6
before_install:
- git fetch https://github.com/bounswe/bounswe2017group10.git master:master
- bash ./any_changes_in.sh frontend || travis_terminate 0
before_script:
- cd Atlas/frontend
- chmod +x test
Expand All @@ -45,15 +52,17 @@ matrix:
- $HOME/.gradle/native/
- $HOME/.gradle/daemon/
android:
components:
- android-26
- android-17
- build-tools-26.0.1
- extra-google-m2repository
- extra-android-m2repository
- sys-img-armeabi-v7a-android-17
before_install:
- git fetch https://github.com/bounswe/bounswe2017group10.git master:master
- bash ./any_changes_in.sh android || travis_terminate 0
install:
# Update sdk tools to latest version and install/update components
- android-update-sdk --components=android-26
- android-update-sdk --components=android-17
- android-update-sdk --components=build-tools-26.0.1
- android-update-sdk --components=extra-google-m2repository
- android-update-sdk --components=extra-android-m2repository
- android-update-sdk --components=sys-img-armeabi-v7a-android-17
- echo yes | sdkmanager "tools"
- echo yes | sdkmanager "platforms;android-26"
- echo yes | sdkmanager "extras;android;m2repository"
Expand All @@ -78,6 +87,4 @@ notifications:
email:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
8 changes: 8 additions & 0 deletions any_changes_in.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash


project=$1
num_changed_files=`git diff --name-only master | grep -E "^Atlas/${project}" | wc -l`

[[ ${num_changed_files} -ne 0 ]]
exit $?

0 comments on commit 299d64a

Please sign in to comment.