openrewrite / rewrite

Automated mass refactoring of source code.
https://docs.openrewrite.org
Apache License 2.0
2.11k stars 314 forks source link

CI: Daily execution on a selection of real source codes #1715

Closed murdos closed 1 year ago

murdos commented 2 years ago

Currently openrewrite and its official plugins are only tested with unit tests. I think it would be really beneficial to the project if recipes were tested on a daily basis on real code.

This would allow:

My vision of how it could work is, for a set of selected real open-source projects:

The selection of external projects should be based on their characteristics (maven or gradle build, java version, ...).

NB: In a certain way, this is a bit similar to https://github.com/hipster-labs/jhipster-daily-builds

yeikel commented 2 years ago

Should this be Daily or as a standalone check with every PR? (as a set of separate GH action checks)

If there are no changes, we shouldn't schedule any run

murdos commented 2 years ago

These checks often take a lot of time, so running on every PR (change) is probably not a good idea.

yeikel commented 2 years ago

These checks often take a lot of time, so running on every PR (change) is probably not a good idea.

If we do a side job, we'll need to monitor it very often(or receive alerts) to avoid regressions

Maybe we can still have a small CI tasks to do a "smoke test" such as the check for compatibility with Java 8

timtebeek commented 1 year ago

At Moderne we've since implemented internal monitoring, where we run recipes daily on a large collection of projects, with alerting, to ensure there's no (or at least fewer) unnoticed regressions. Thanks for the suggestion!