kordamp / kordamp-gradle-plugins

A collection of Gradle plugins
https://kordamp.org/kordamp-gradle-plugins/
Apache License 2.0
138 stars 25 forks source link

[coveralls] Coveralls stopped working in 0.38.0 and later #419

Closed musketyr closed 3 years ago

musketyr commented 4 years ago

coveralls task is never triggered even the env variables CI and COVERALLS_REPO_TOKEN are present for versions 0.38.0 and later.

example repository https://github.com/agorapulse/micronaut-console

musketyr commented 4 years ago

Actually, I might be mistaken. I haven't investigated further but I can publish to Coveralls using 0.31.2. Version 0.37.0 does trigger the task but does not publish anything. I haven't tried the versions between these two.

musketyr commented 4 years ago

Just verified that the last version working gracefully is 0.36.0.

aalmiray commented 4 years ago

Thank you for the investigation. I believe 0.37.0 made changes in the DSL on how properties between child and root projects are evaluated. The problem might be related to that.

aalmiray commented 4 years ago

Could you quickly check if enabling coveralls explicitly makes it work? config.coverage.coveralls.enabled = true. I think the problem may be relying on config.coverage.jacoco.enabled by default.

The problem may start here

https://github.com/kordamp/kordamp-gradle-plugins/blob/master/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/base/ProjectConfigurationExtension.groovy#L541-L545

Given that Coveralls will check the following after merge

https://github.com/kordamp/kordamp-gradle-plugins/blob/master/plugins/base-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/base/plugins/Coveralls.groovy#L51-L55

But JaCoCo is not yet ready by the time Coveralls makes the check.

musketyr commented 4 years ago

it made it working - see https://github.com/agorapulse/micronaut-console/pull/3

aalmiray commented 4 years ago

I also have a build producing coverage reports but I don't require explicit enabling. However I do run aggregateJacocoReports before coveralls. Wonder if tasks dependencies are not working as they should.

https://github.com/jsr377/jsr377-converters

aalmiray commented 3 years ago

ping @musketyr. Is this still an issue?

musketyr commented 3 years ago

I still had to declare it explicitly

https://github.com/agorapulse/dru/blob/master/build.gradle#L119

út 26. 1. 2021 v 17:44 odesílatel Andres Almiray notifications@github.com napsal:

ping @musketyr https://github.com/musketyr. Is this still an issue?

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/kordamp/kordamp-gradle-plugins/issues/419#issuecomment-767672551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFBHNLMVZWE4ZGVP5CGRZDS33WNNANCNFSM4TR7XHFA .

aalmiray commented 3 years ago

I see. So the workaround makes it work but it'd be better if it worked out of the box without extra configuration, right?

musketyr commented 3 years ago

Yes. or at least explicitly documented.

aalmiray commented 3 years ago

I've tested with both single and multi-project builds that have at least 1 project with tests. As far as I can tell the coveralls plugins is set as enabled when the project contains Java sources. However applying the configuration to the kordamp-gradle-plugins build itself results in coveralls being disabled. Will keep looking.

aalmiray commented 3 years ago

Scratch that, it's not the fact that the project may contain Groovy code or not, it's if the rot project has tests or not. I believe I have found the cause of problem.