Skip to content

Clean up GitHub workflows #2951

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

Merged
merged 8 commits into from
Apr 21, 2023
Merged

Clean up GitHub workflows #2951

merged 8 commits into from
Apr 21, 2023

Conversation

IgnatBeresnev
Copy link
Member

@IgnatBeresnev IgnatBeresnev commented Mar 30, 2023

We have quite a number of actions that do nothing or are not very helpful, yet they waste time and have a possibility of randomly failing for uncontrollable reasons, not to say they make it impossible to understand which checks are important and which aren't. This PR addresses that problem, along with some minor improvements like naming.

The minimal number of jobs per PR went down from 29 to just 7

Unit test changes

We currently (as in before this PR) run unit tests with a matrix of linux/windows and java 8/11/17. Running the tests on both windows and linux is helpful, it has caught significant problems before.

However, running under different Java versions for every single commit is not that helpful. On the contrary, Java 17 tends to be very flaky, so we have to restart it all the time.

I've changed it so that we run:

  • fast (smoke) tests for every commit in a PR, on linux/windows, but only under Java 11 (can change it to Java 8). Should be enough to catch the tests failing (especially since they are also additionally run in TeamCity)
  • long and thorough tests for every commit in master, with the following matrix: linux/windows/macos and Java 8/11/17. They'll be run right after a PR has been merged, so hopefully we'll notice if it introduced any problems, and address it in time.

Long and thorough tests can be triggered manually for a specific branch, so we should have the possibility of validating big changes in advance (i.e if we see that it might break java 8 or 17).

Later on it'd be nice to randomize some aspects of the tests using something like github-actions-random-matrix. We'd be able to run random Java versions for PR tests, or shuffle platforms. This way, it'll still be quick, yet it should cover more cases overall as there are typically multiple commits in a PR.

Common changes

  • Do not trigger a workflow if it doesn't need to be run. For instance, we only need to build/publish the examples if the examples/** directory was touched. Otherwise, they are using a stable version of Dokka and no other changes in code should affect them.
  • Change workflow/job names to be shorter and more understandable, will help with visually inspecting it from the UI.
  • Change workflow file names to be grouped together and convey the intention more.

I'll leave more detailed/context comments for individual changes/files

@IgnatBeresnev IgnatBeresnev added the infrastructure Everything related to builds tools, CI configurations and project tooling label Mar 30, 2023
@IgnatBeresnev IgnatBeresnev requested a review from vmishenev March 30, 2023 17:37
Copy link
Member Author

Choose a reason for hiding this comment

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

Doesn't seem like we need to validate the wrapper unless it's been changed.

  • Extracted it into a separate file so that it can be run with a paths filter.
  • Additionally running it on every commit in master in case someone with write access pushes it without a PR or does something funny to it indirectly.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think anyone needs it? I noticed it a while ago and thought it was useful, but I still never used it..

@IgnatBeresnev IgnatBeresnev merged commit eb50c4f into master Apr 21, 2023
@IgnatBeresnev IgnatBeresnev deleted the github-actions-improvements branch April 21, 2023 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Everything related to builds tools, CI configurations and project tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants