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

chore(ci): do not run CI on draft PRs unless explicitly run via commit message #17350

Merged
merged 33 commits into from
Jan 11, 2023

Conversation

dsherret
Copy link
Member

@dsherret dsherret commented Jan 11, 2023

Tested:

  • Running CI in draft PR without [ci] message (does not run).
  • Running CI in draft PR with [ci] message (runs).
  • Running CI in draft PR without [ci] message (does not run), then marking the PR as ready for review (runs).

This will help us reduce CI time during development. The CI can be explicitly run on draft PRs by adding [ci] to the commit message.

@dsherret dsherret marked this pull request as ready for review January 11, 2023 16:49
@dsherret dsherret marked this pull request as draft January 11, 2023 16:50
@dsherret dsherret marked this pull request as ready for review January 11, 2023 17:02
@@ -201,541 +248,549 @@ const ci = {
submodules: false,
},
},
submoduleStep("./test_util/std"),
Copy link
Member Author

Choose a reason for hiding this comment

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

The only change I made below was wrap all the steps in a ...cancelEarlyIfDraftPr(

- name: Clone submodule ./test_util/wpt
run: git submodule update --init --recursive --depth=1 -- ./test_util/wpt
if: matrix.job == 'test'
if: steps.exit_early.outputs.EXIT_EARLY != 'true' && (matrix.job == 'test')
Copy link
Member Author

Choose a reason for hiding this comment

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

Again, the output kind of sucks, but we're maintaining the ci.generate.ts file now so this file doesn't matter that much.

Copy link
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, maybe you could update PR template to indicate how CI can be triggered?

@dsherret dsherret enabled auto-merge (squash) January 11, 2023 18:36
@dsherret dsherret merged commit 6ee5563 into denoland:main Jan 11, 2023
@dsherret dsherret deleted the ci_draft_no_ci branch January 11, 2023 18:53
dsherret added a commit that referenced this pull request Jan 13, 2023
…t message (#17350)

This will help us reduce CI time during development. The CI can be
explicitly run on draft PRs by adding `[ci]` to the commit message.
dsherret added a commit that referenced this pull request Jan 13, 2023
…t message (#17350)

This will help us reduce CI time during development. The CI can be
explicitly run on draft PRs by adding `[ci]` to the commit message.
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.

None yet

2 participants