This repository was archived by the owner on Mar 16, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Move travis to docker #116
Closed
Closed
Changes from 1 commit
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,42 @@ | ||
| language: android | ||
| jdk: | ||
| - oraclejdk8 | ||
| sudo: required | ||
|
|
||
| language: android | ||
| jdk: oraclejdk8 | ||
|
|
||
| services: | ||
| - docker | ||
|
|
||
| env: | ||
| - TEST_SUITE=unit | ||
| - TEST_SUITE=instrumentation | ||
|
|
||
| android: | ||
| components: | ||
| # Uncomment the lines below if you want to | ||
| # use the latest revision of Android SDK Tools | ||
| - tools | ||
| - platform-tools | ||
| - tools | ||
|
|
||
| # The BuildTools version used by your project | ||
| - build-tools-26.0.1 | ||
|
|
||
| # The SDK version used to compile your project | ||
| - android-22 | ||
| - android-26 | ||
|
|
||
| # Additional components | ||
| - extra-google-google_play_services | ||
| - extra-google-m2repository | ||
| - extra-android-m2repository | ||
| - addon-google_apis-google-24 | ||
|
|
||
| # Specify at least one system image, | ||
| # if you need to run emulator(s) during your tests | ||
| - sys-img-armeabi-v7a-android-22 | ||
|
|
||
|
|
||
| - $(if [ $TEST_SUITE == "instrumentation" ]; then echo "tools,platform-tools,tools,build-tools-26.0.1,android-22,android-26,extra-google-google_play_services,extra-google-m2repository,extra-android-m2repository,addon-google_apis-google-24,sys-img-armeabi-v7a-android-22"; fi) | ||
|
|
||
| before_install: | ||
| - if [ $TEST_SUITE == "unit" ]; then | ||
| docker pull stefma-docker-hub.bintray.io/android-build-env:0.1-alpha; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. how can we update this docker image?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is an open source project. |
||
| docker run -i -v $PWD:/project -t stefma-docker-hub.bintray.io/android-build-env:0.1-alpha /bin/bash -c "./gradlew build jacocoTestReport"; | ||
|
||
| fi | ||
|
|
||
| before_script: | ||
|
|
||
| # First assemble the project before launching the emulator | ||
| - ./gradlew assemble | ||
|
|
||
| # List available emulators | ||
| - android list targets | ||
|
|
||
| # Emulator Management: Create, Start and Wait | ||
| - echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a | ||
| - emulator -avd test -no-skin -no-audio -no-window & | ||
| - android-wait-for-emulator | ||
| - adb shell input keyevent 82 & | ||
| - if [ $TEST_SUITE == "instrumentation" ]; then | ||
| ./gradlew assemble; | ||
| echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a; | ||
| emulator -avd test -no-skin -no-audio -no-window & | ||
| android-wait-for-emulator; | ||
| adb shell input keyevent 82 & | ||
| fi | ||
|
|
||
| script: | ||
| - ./gradlew build jacocoTestReport assembleAndroidTest connectedCheck | ||
| - if [ $TEST_SUITE == "instrumentation" ]; then | ||
| ./gradlew assembleAndroidTest connectedCheck; | ||
| fi | ||
| - if [ $TEST_SUITE == "unit" ]; then | ||
| echo "Everything is done already in the before_install docker..."; | ||
| fi | ||
|
|
||
| after_success: | ||
| - bash <(curl -s https://codecov.io/bash) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the echo multiline?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently I create a
script.shwhich reads theBUILD_TOOLS_VERSIONandSDK_VERSIONand replace the given numbers.These script return then all components..