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

ci: test the publish workflow in PRs if changed #408

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

languitar
Copy link
Contributor

@languitar languitar commented Jan 17, 2024

This PR runs the GitHub Actions publish workflow in case we have changed it in a PR. Without this, testing changes to this workflow is guess work until a release appeared. The workflow has been modified to only publish to maven local in PR runs to avoid spamming repositories with artificial testing releases. That way, we don't test everything about publishing, but a complete misconfiguration of the publishing tasks or pipeline should become visible. Docker publishing is not tested and skipped here as I couldn't find an easy way to not push things to our repos.

@languitar languitar force-pushed the feature/test-publish-workflow branch 5 times, most recently from 0f8b0ea to 8630d25 Compare January 17, 2024 10:28
@languitar languitar marked this pull request as ready for review January 17, 2024 11:47
@languitar languitar requested a review from a team as a code owner January 17, 2024 11:47
Copy link
Contributor

@mhuster23 mhuster23 left a comment

Choose a reason for hiding this comment

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

I'm not sure if this PR is actually beneficial.
We already publish to maven local for the plugin tests so a misconfiguration of the tasks would become apparent there.
On top of that, due to the added if statements, it makes it harder for a human to parse, what the workflow does 99% of the time.

@languitar
Copy link
Contributor Author

This CI workflow would not be running at all before a release. And correctly defining a GitHub Actions workflow is often not easy and requires many iteration with GitHub actually executing the workflow to detect issues. We would only see the misconfigurations of the workflow by triggering many releases, thereby polluting the public changelog and forcing users into more updates. With the experience I have so far with the complexity of reconfiguring such workflows I'd say it's worth running this here, even if it is not a 100% reproduction of the actual release workflow.

@languitar languitar requested a review from odzhychko January 17, 2024 12:11
@languitar languitar force-pushed the feature/test-publish-workflow branch from 8630d25 to d775f44 Compare January 17, 2024 12:11
@languitar
Copy link
Contributor Author

Any other opinions on whether this is worth it?

@odzhychko
Copy link

Any other opinions on whether this is worth it?

Not a strong opinion, but I favor of the change.
(I broke accidentally broke publishing myself a few times.)
The logic in the Workflow file is not too complicated.

@languitar languitar force-pushed the feature/test-publish-workflow branch from d775f44 to 5a837ea Compare January 22, 2024 08:36
@languitar languitar force-pushed the feature/test-publish-workflow branch from 5a837ea to af57e33 Compare January 22, 2024 08:41
@languitar languitar merged commit 3940db0 into main Feb 5, 2024
14 checks passed
@languitar languitar deleted the feature/test-publish-workflow branch February 5, 2024 08:56
@slisson
Copy link
Member

slisson commented Feb 7, 2024

🎉 This PR is included in version 4.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

None yet

4 participants