-
Notifications
You must be signed in to change notification settings - Fork 57
Conversation
Lol 44 minute Travis build, hopefully it doesn't take this long every time? I ran into some examples while trying to get this up and running that mentioned having Travis cache various Gradle files to speed up builds - would that be a good thing to add here @d4rken ? Also I realise that the coverage reports are not being uploaded to Coveralls properly, I am looking into it |
.travis.yml
Outdated
script: | ||
- ./gradlew clean assemble test | ||
- ./gradlew clean assemble connectedAndroidTest coveralls |
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.
connectedAndroidTest
runs instrumentation tests, and test
runs junit tests, I think just using either means it's not running the other.
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.
Would ./gradlew clean assemble test connectedAndroidTest coveralls
work?
app/build.gradle
Outdated
@@ -49,6 +50,7 @@ android { | |||
debug { | |||
minifyEnabled false | |||
useProguard false | |||
testCoverageEnabled true |
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.
Is this needed? Isn't this forced by coveralls
in the test command? We don't need coveralls when developing, e.g. everytime we press RUN
.
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.
I believe this is needed to generate the reports, running ./gradlew coveralls
with that option disabled doesn't seem to make a report in .../build/reports/coverage, perhaps there's a way to toggle this based on whether or not it's in a CI environment
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.
Maybe I'm mistaken and just setting this to "true" does not increase build times?
perhaps there's a way to toggle this based on whether or not it's in a CI environment
You can set env variables and check them from gradle, see https://docs.travis-ci.com/user/environment-variables/
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.
Hmm not sure, but I'll make it CI only before I finish up this pull request
.travis.yml
Outdated
|
||
env: | ||
matrix: | ||
- ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a |
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.
If we go all out, how would we make it run the tests on both the lowest supported API, and the highest?
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.
I'll add to the next commit :)
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.
Having a bit of trouble getting this working, but coveralls seems to be uploading correctly now
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.
Then lets make it for one API only, merge it and then try multiple APIs in a different PR.
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.
I'm just leaving it at just 21 because 22, 23, 24, 25 don't seem to work, will open up an issue to look into this further down the line
Changes Unknown when pulling 0bc926c on bobheadxi:coverage-report into ** on d4rken:dev**. |
Changes Unknown when pulling 4beac94 on bobheadxi:coverage-report into ** on d4rken:dev**. |
Changes Unknown when pulling 25d7cc1 on bobheadxi:coverage-report into ** on d4rken:dev**. |
Travis can be quite annoying ;). |
@bobheadxi You can merge this, but use "Squash and merge", so the fix attempts are not part of the repos commit log. |
Thanks! Glorious code coverage of less than 1% now proudly on display |
Issues
#59 and #58, mostly because I just did it for one of my repos and it looks kind of neat
Changes