Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code cov on releases #493

Merged
merged 2 commits into from
Aug 7, 2016
Merged

Code cov on releases #493

merged 2 commits into from
Aug 7, 2016

Conversation

TimvdLippe
Copy link
Contributor

Releases are now triggering CI builds to generate the code coverage reports.
An example of a normal build can be found at https://travis-ci.org/mockito/mockito/builds/143765346#L334-L374
An example of a build ignored as the commit message contained [ci skip-release] can be found at https://travis-ci.org/mockito/mockito/builds/143765834#L311-L314

Fixes #465

@codecov-io
Copy link

codecov-io commented Jul 10, 2016

Current coverage is 87.87%

Sunburst

No coverage report found for master at 5dd0f71.

Powered by Codecov. Last updated by 5dd0f71...8916088

- ./gradlew ciBuild release
- TRAVIS_MESSAGE="$(git log --format=%B -n 1)"
- ./gradlew ciBuild
- if [[ $TRAVIS_MESSAGE != *"[ci skip-release]"* ]] ; then ./gradlew release; fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be a oneliner I believe

if [[ $(git log --format=%B -n 1) != *"[ci skip-release]"* ]] ; then ./gradlew release; fi

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The git log command was from a travis issue as there is an intent to add the new environment variable. The command is kinda magic, so naming the variable makes it imo easier to comprehend.

@bric3
Copy link
Contributor

bric3 commented Jul 11, 2016

From the changes I don't understand why the code coverage is mentioned in this PR. Code coverage should be triggered by any travis build.

@TimvdLippe
Copy link
Contributor Author

Yes it is triggered on every Travis build. However, as explained in #465 the delivery drones creates a release commit with ci skip. Therefore Travis is not triggered and codecov fails, see the first comment on this PR.

To prevent a release loop on travis, instead of a full ci skip it only does a ci skip-release. This is handled in the .travis.yml.

@raphw
Copy link
Member

raphw commented Aug 7, 2016

Is this PR still relevant? If yes, is it ready to be merged?

@TimvdLippe
Copy link
Contributor Author

Yes it is still relevant. Releases do not trigger code cov and therefore result in empty comparisons.

@TimvdLippe
Copy link
Contributor Author

I will merge it, if it seems to break stuff (I do not expect it to) then I will revert.

@TimvdLippe TimvdLippe merged commit 272b32b into master Aug 7, 2016
@TimvdLippe TimvdLippe deleted the code-cov-on-releases branch August 7, 2016 09:04
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
szpak added a commit to szpak-forks/mockito that referenced this pull request Aug 8, 2016
TimvdLippe pushed a commit that referenced this pull request Aug 8, 2016
@mureinik
Copy link
Contributor

mureinik commented Mar 9, 2017

@TimvdLippe continuing our discussion on PR #980 - can this fix be backported to release/2.x? IIUC, the majority of the work is done there, and CodeCov will be very helpful there too.

@TimvdLippe
Copy link
Contributor Author

@mureinik Back then we did not divert yet with release/2.x so I think it recently regressed in release/2.x instead. Have to investigate :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants