plone / plone.api

The Plone API
https://6.docs.plone.org/plone.api
Other
86 stars 53 forks source link

Do not run GitHub Actions tests twice. #513

Closed thet closed 1 year ago

thet commented 1 year ago

Only run GitHub Actions tests when commiting directly against master or main or opening a pull request agains master or main. This avoids to run the same test suite for the same environment twice.

mister-roboto commented 1 year ago

@thet thanks for creating this Pull Request and helping to improve Plone!

TL;DR: Finish pushing changes, pass all other checks, then paste a comment:

@jenkins-plone-org please run jobs

To ensure that these changes do not break other parts of Plone, the Plone test suite matrix needs to pass, but it takes 30-60 min. Other CI checks are usually much faster and the Plone Jenkins resources are limited, so when done pushing changes and all other checks pass either start all Jenkins PR jobs yourself, or simply add the comment above in this PR to start all the jobs automatically.

Happy hacking!

wesleybl commented 1 year ago

I think it's bad because the test will only run in PR. I like to check the tests before doing the PR. I prefer the approach used in Volto:

https://github.com/plone/volto/blob/master/.github/workflows/acceptance.yml#L5

davisagli commented 1 year ago

@wesleybl You could open a draft PR and mention that you are opening it in order to run the tests. But, I would also be okay with the way we did it for volto and plone.restapi.

thet commented 1 year ago

@davisagli Tnx for the review

@wesleybl I'm merging but as david said, you can open another PR. I personally don't need test runs on branches without a PR. I open PRs early in "draft" state. That's more visible not only to others but also to me which reduces the chance to forget about that work.

If every project on GitHub would optimize the test runs we would save some significant amount of energy :green_heart: