-
Notifications
You must be signed in to change notification settings - Fork 102
build-result-capture.init.gradle is giving errors in action run #350
Comments
Apparently, it should be possible to use |
Fwiw, I find it a bit strange to build the project with many different Gradle versions, rather than using, say, TestKit, to use a fixed version to build the project and then run tests using many different Gradle versions. Using TestKit for instance would mean using a separate Gradle User Home dir (even if you use the same Gradle version as the one used to build the project), so your tests won't be polluted by things setup in the Gradle User Home, like the init script used by the gradle-build-action. |
@tbroyer We do use TestKit as well, but due to the differing API between Gradle versions and the necessity to able to work against various Gradle versions (as when we internally rebuild all projects they may use different versions of Gradle) it meant the test suite had to be more comprehensive. |
Thanks for the report @rnc, and for the diagnosis. Indeed I can see how the init-script will fail when a Gradle build is run without the GitHub Actions env vars set. I plan on fixing this so that builds run outside of the GitHub Actions context will not have any results file written, and thus will not show up in the GitHub Actions Job Summary. |
In my action run I can see
I think this is coming from https://github.com/gradle/gradle-build-action/blob/main/src/resources/init-scripts/build-result-capture.init.gradle#L109 as its possible
getenv
returns null. It may be better to usegetProperty
with a default value?An example of this happening is https://github.com/project-ncl/gradle-manipulator/runs/7109028866?check_suite_focus=true
The text was updated successfully, but these errors were encountered: