-
Notifications
You must be signed in to change notification settings - Fork 50
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
Add github workflow to run PDK tests #176
Conversation
GitHub actions would be my preferred option - I'm using it in a few places for testing and deployment of other projects (python and kubernetes based). I'll pick this up on Monday as I'm away for the weekend 🙂 |
Great stuff! There's a few PRs from me today (and at least 1 more to come). None are urgent, of course. Enjoy your weekend away! |
Hope you don't mind, I've tweaked this a little. I've switched to a different provider of the PDK actions which seemed a bit better wrapped and allows for testing across multiple Puppet versions etc.
There doesn't seem to be a performance benefit to using these other actions, but I set the validate and test actions to run in parallel rather than sequentially, and it knocks about a minute off the total pipeline. |
I've also added an action for automatically publishing to Puppet Forge when a new tag is created which matches a semver notation with a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to approve this as it seems to work properly, but I'll let you merge it so you can read/comment on any part before it's finalised.
Previously tested was https://github.com/mysociety/action-pdk, which didn't offer as much functionality, and didn't run `pdk validate`.
… or special symbols.
This all looks good to me. I've updated my original branch here: https://github.com/SearchLightNZ/puppet-freeradius/tree/add_test_github_test_workflow No functional changes - but I've:
This is probably a Git workflow/style debate. On squashing: What do you think? (About my git philosophical ramblings, and the tweaked branch :) |
Doing some testing of this with my branch for #162 which has tests for Debian osfamily as well, and this doesn't seem to be working that well. I can run it all manually and it goes fine, but for some reason running it through GH actions doesn't play nice.. will report more when I have it.. |
Looks good to me. I've always leaned towards merging rather than rebasing, although I think this is just because I learned about merging before rebasing, rather than for any philosophical reason. Perfectly happy with rebasing here, and I also like clean history and atomic commits (once it reaches My instinct is to merge this now it's working, rebase or merge your branch for #162, and then fix that branch over there (whether it be the tests or the code). |
Yep, that sounds reasonable. Turns out the issue isn't unique to this repo either: https://github.com/nward/puppet_pdk_actions_bug Re. rebasing - there's also a bit of a theory that rebasing is scary and should never be done etc. - which is generally true if you're working on a branch with other people, but if you're working alone or can coordinate well then that's no longer true. Most modern git workflows recommend rebasing like this. It's different if you use git to manage infrastructure or something and need it as an audit trail, of course, but that's not what's happening here ! |
b561c9d
to
e092b32
Compare
OK - I was able to force push my changes and if it all runs fine it will need an approval then we can merge. Incidentally, I thought I had created this PR from SearchLightNZ/puppet-freeradius - did the source branch change when you committed changes, or did I accidentally create this as a branch on djjudas21/puppet-freeradius? |
This branch was created on djjudas21/puppet-freeradius (which I'm happy for you to do) |
Ah! I have been intending to do them on my one. I'll keep trying to do that, but, glad it won't annoy you if I typo it.. :-) |
Create a GitHub workflow which runs PDK tests - just using the workflow example from https://github.com/mysociety/action-pdk for now.
This workflow currently fails because of the issue that will be fixed in #174.
Github actions is good - there are other options available, but this is super low effort to make go. If we find it lacking we can look at others - but I think if we look at using GH Actions for doing releases then it's reasonable to use it for testing, too.