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

Run tests on pushes to all branches, not just main #43

Open
johnboyes opened this issue Mar 24, 2023 · 5 comments
Open

Run tests on pushes to all branches, not just main #43

johnboyes opened this issue Mar 24, 2023 · 5 comments

Comments

@johnboyes
Copy link

I think it would be useful to have the tests run on pushes to all branches, as that provides quicker feedback. Would then mean that anyone creating a new repo from this template repo would also have the tests run on all branches, out of the box. If the maintainers agree then I'm happy to submit a PR, thanks.

@samruddhikhandale
Copy link
Member

Hi 👋

I agree, allowing to run tests on every push to all the branches would be beneficial. However, I am not sure if everyone might prefer that ; one could have an opened PR which would trigger the tests, else someone could manually run the tests on their branch (because workflow_dispatch is enabled). Not sure if triggering actions on every push could be annoying! 😅

I think this is alright for now, and if we hear similar feedback or 👍 , then we can update the trigger. As this template repo provides a base, people can build upon this by adding a "*" to the push trigger (if needed).

@johnboyes Let me know what you think, happy to hear if you think otherwise! 😄

//cc @bamurtaugh @joshspicer Interested in hearing your thoughts as well.

@bamurtaugh
Copy link
Member

bamurtaugh commented Mar 24, 2023

Thanks for opening @johnboyes! I agree with @samruddhikhandale - I think this is a really interesting idea, and I'm interested to see if other members of the dev container community comment that this would or would not be helpful for them.

@johnboyes
Copy link
Author

Thanks for the replies @samruddhikhandale and @bamurtaugh. Here's my thinking as to why running the tests on all pushes is a good thing:

  • quick feedback is a fundamental DevOps principle
    • so rather than thinking why should we run the tests on all pushes, the thinking should be: why wouldn't we?
  • the quality of PRs will go up, as developers will have earlier awareness of whether the tests pass, rather than only finding out when they create the PR (yes they can run the tests locally, but not everyone does)
  • having the tests run on every push promotes the importance of the test suite, which is a good thing
  • makes it more likely that developers who use this repo as a template will write tests on their own repos
  • avoids the situation where a developer carefully crafts a PR and is then frustrated when they find out only then they have broken some tests
  • I don't think that people would find the test runs on every push annoying, as the test suite is quick to run.
    • if the tests pass, it provides early reassurance
    • if the tests fail, it provides early warning
    • the flip side of this is that not running the tests on every push is a form of premature optimisation

Let me know what you think. If you think my reasoning has some merit I'd propose making the change to try it out, and see what everyone's experience is. Would be easy to then revert it after a period of time if the majority preferred

cc @joshspicer

@johnboyes
Copy link
Author

Hi @samruddhikhandale and @bamurtaugh, just following up on this, to check you saw my reply above? 🙏🏻

@joshspicer
Copy link
Member

Sounds good to me.

The intention of this repo is for folks to use is as a template and edit as they please. Encouraging quicker feedback by running the test suite on all branches works for me 👍

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

No branches or pull requests

4 participants