Conversation
Seems that UnitTests are working now in docker 👍 |
Read also that: https://docs.travis-ci.com/user/speeding-up-the-build/ Thinking about to have two parallel builds:
|
\o/ 💛 :awesome: :sweet: 🍬 Here is a 🌮 |
Next step is to cache the dependencies And other 🍬 :
|
|
||
before_install: | ||
- if [ $TEST_SUITE == "unit" ]; then | ||
docker pull stefma-docker-hub.bintray.io/android-build-env:0.1-alpha; |
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.
how can we update this docker image?
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.
It is an open source project.
you can find it here: https://github.com/StefMa/AndroidBuildEnv
Don't cache. |
* Splitting unit and instrumentation tests * Let's run unit tests in docker
3d6443d
to
d6d91ec
Compare
.travis.yml
Outdated
- 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) |
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.sh
which reads the BUILD_TOOLS_VERSION
and SDK_VERSION
and replace the given numbers.
These script return then all components..
.travis.yml
Outdated
before_install: | ||
- if [ $TEST_SUITE == "unit" ]; then | ||
docker pull stefma-docker-hub.bintray.io/android-build-env:0.1-alpha; | ||
docker run -i -v $PWD:/project -t stefma-docker-hub.bintray.io/android-build-env:0.1-alpha /bin/bash -c "./gradlew build jacocoTestReport"; |
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.
move this to the script
section
🤦♂️ |
bb055cc
to
4efa5da
Compare
4efa5da
to
70d8af7
Compare
68bd304
to
5c2ba57
Compare
Rebased all. Problem was that |
Seems that codecov is reporting fine \o/ |
|
||
# Read the BUILD_TOOL_VERSION and COMPILE_SDK_VERSION | ||
BUILD_TOOLS_VERSION=$(cat build.gradle | grep "BUILD_TOOLS_VERSION*" | sed -e "s/^.*'\(.*\)'/\1/") | ||
COMPILE_SDK_VERSION=$(cat build.gradle | grep "COMPILE_SDK_VERSION*" | sed -e "s/^.*= \(.*\)$/\1/") |
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 put this in the .travis.yml
, too?
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.
No. Unfortunately this isn't possible because of the limitations of the travis.yml file
4c4569d
to
5c2ba57
Compare
Based on #115
Benefits of using docker:
Benefits of the new travisscript:
Do we have speed benefits?
What do test: