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

Trigger CI on pull_request event #4629

Merged
merged 3 commits into from
Mar 31, 2023
Merged

Trigger CI on pull_request event #4629

merged 3 commits into from
Mar 31, 2023

Conversation

davisagli
Copy link
Member

@davisagli davisagli commented Mar 31, 2023

@fredvd @sneridagh @mauritsvanrees This is what I would prefer instead of #4621. I tried it in #4628 and it seems to work.

@netlify
Copy link

netlify bot commented Mar 31, 2023

Deploy Preview for volto canceled.

Name Link
🔨 Latest commit f6c0f4d
🔍 Latest deploy log https://app.netlify.com/sites/volto/deploys/642728149ab164000879eee5

@cypress
Copy link

cypress bot commented Mar 31, 2023

Passing run #4756 ↗︎

0 489 20 0 Flakiness 0

Details:

Avoid duplicate builds
Project: Volto Commit: f6c0f4d472
Status: Passed Duration: 15:33 💡
Started: Mar 31, 2023 6:39 PM Ended: Mar 31, 2023 6:55 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@cypress
Copy link

cypress bot commented Mar 31, 2023

Passing run #4755 ↗︎

0 48 0 0 Flakiness 0

Details:

Merge 8e830ad into 0106966...
Project: Volto Commit: 1b34bc2701 ℹ️
Status: Passed Duration: 09:20 💡
Started: Mar 31, 2023 4:44 PM Ended: Mar 31, 2023 4:53 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Member

@fredvd fredvd left a comment

Choose a reason for hiding this comment

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

approved, as discussed on #4621 we should only add on: pull_request to avoid security issues.

@wesleybl
Copy link
Member

@davisagli the "bad" thing about this is that the tests will be run twice. One for push one for PR. I think the Zope people did something to prevent this.

@davisagli
Copy link
Member Author

davisagli commented Mar 31, 2023

@wesleybl Good point! I think this is what prevents it: https://github.com/zopefoundation/Zope/blob/master/.github/workflows/tests.yml#LL47C5-L47C11

And more discussion in zopefoundation/meta#145

Let me try that...

@davisagli
Copy link
Member Author

Hmm, it works, but the duplicate jobs for the pull_request trigger still show up in the list of checks as "skipped", which is a bit noisy.

@davisagli
Copy link
Member Author

An alternative would be to limit builds for the push event to only key branches (master, 16.x, etc). I think the only downside is that if someone pushes a commit to a work-in-progress branch that doesn't have a PR yet, the CI jobs would not run until they open a PR. Maybe that is actually what we want, to avoid unnecessary builds...

@fredvd
Copy link
Member

fredvd commented Mar 31, 2023

Hmm, it works, but the duplicate jobs for the pull_request trigger still show up in the list of checks as "skipped", which is a bit noisy.

Yes, I have the same in another workflow where normal pushes trigger something for a testing environment and tag releases update the live environment. The best I could do there was look at github.ref_type to cancel al jobs for on: push, but they still show up in the actions run list.

@fredvd fredvd merged commit 5808b78 into master Mar 31, 2023
@fredvd fredvd deleted the workflow-pr-trigger branch March 31, 2023 19:01
@wesleybl
Copy link
Member

An alternative would be to limit builds for the push event to only key branches (master, 16.x, etc).

I usually don't like that, because I want to run the tests, before opening a PR. Usually when I open the PR the tests are already passing.

Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

I approve as well.

sneridagh added a commit that referenced this pull request Apr 3, 2023
* master:
  developer process for first time contributing (#4617)
  Trigger CI on pull_request event (#4629)
  Pining of `pydata-sphinx-theme` and `sphinx-book-theme`, CI is complaining. (#4626)
  Set sameSite in `18N_LANGUAGE` cookie (#4627)
sneridagh added a commit that referenced this pull request Apr 5, 2023
* master: (67 commits)
  Add current page parameter to the route in the listing and search block pagination (#4159)
  Fixed wrong localization on password reset page(#4656) (#4657)
  Release notes for 16.19.0 (#4655)
  Razzle upgrade notice in upgrade guide (#4641)
  Release generate-volto 7.0.0-alpha.3
  Update to latest Razzle - needed since #3997. This fixes the duplicated Razzles issue (#4640)
  3092 improve spellcheck (#4633)
  developer process for first time contributing (#4617)
  Trigger CI on pull_request event (#4629)
  Pining of `pydata-sphinx-theme` and `sphinx-book-theme`, CI is complaining. (#4626)
  Set sameSite in `18N_LANGUAGE` cookie (#4627)
  Update simple-git (#4546)
  DefaultView (blocks disabled): Show field name as tip on hover of label (#4598)
  Fix regexp that checks valid URLs and improve tests (#4601)
  Release 17.0.0-alpha.3
  Update changelog relese 16.18.0 (#4596)
  InternalURl helper method should incorporate externalRoutes settings … (#4560)
  Update message Add-on control panel (#4574)
  Fix video warnings link errors (#4578)
  Using Vale in CI for spellcheck (#4423)
  ...
sneridagh added a commit that referenced this pull request Apr 10, 2023
* master: (326 commits)
  Make URL a literal string to fix broken link (#4667)
  Move developer guidelines to contributing #4665 (#4666)
  Update Volto contributing to align with and refer to the new Plone co… (#4634)
  Release @plone/scripts 3.0.0
  Changelog
  Added querystring search get option (#4658)
  Add current page parameter to the route in the listing and search block pagination (#4159)
  Fixed wrong localization on password reset page(#4656) (#4657)
  Release notes for 16.19.0 (#4655)
  Razzle upgrade notice in upgrade guide (#4641)
  Release generate-volto 7.0.0-alpha.3
  Update to latest Razzle - needed since #3997. This fixes the duplicated Razzles issue (#4640)
  3092 improve spellcheck (#4633)
  developer process for first time contributing (#4617)
  Trigger CI on pull_request event (#4629)
  Pining of `pydata-sphinx-theme` and `sphinx-book-theme`, CI is complaining. (#4626)
  Set sameSite in `18N_LANGUAGE` cookie (#4627)
  Update simple-git (#4546)
  DefaultView (blocks disabled): Show field name as tip on hover of label (#4598)
  Fix regexp that checks valid URLs and improve tests (#4601)
  ...
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

Successfully merging this pull request may close these issues.

4 participants