-
Notifications
You must be signed in to change notification settings - Fork 404
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
ci: disable running CI for releases #1671
Conversation
cf7bda4
to
0ac9131
Compare
Codecov Report
@@ Coverage Diff @@
## main #1671 +/- ##
=======================================
Coverage 96.87% 96.87%
=======================================
Files 200 200
Lines 39180 39180
Branches 24 24
=======================================
Hits 37955 37955
Misses 1225 1225
Flags with carried forward coverage won't be shown. Click here to find out more. 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
0ac9131
to
088a8af
Compare
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.
Ran through the test scenarios on my personal fork, just one thought about getting rid of a conditional I think we can drop.
1) First, disable running on pushes. This is because pushes don't have context when they come from a pull request. In particular, pushes don't have the branch name the pull request came from. 2) Then, disable running if the branch name starts with release. 3) In the same condition check, enable runs only for branches that are closed via a merge. We don't want to trigger CI for a PR that is closed because we decided to abandon the idea. fix: remove unnecessary conditional
20e20a4
to
1e87593
Compare
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.
🎉
Description
Please provide a brief description of the changes introduced in this pull request.
What problem does it solve? What is the context of this change?
There are a few parts to this:
First, disable running on pushes. This is because pushes don't have context when they come from a pull request. In particular, pushes don't have the branch name the pull request came from.
At the same time, enable running on
synchronize
andclose
actions onpull_request
events. This will ensure that when a PR gets updated or merged, we'll see a CI run. This changes the default actions of only running onopened
,synchronize
, orreopened
.Then, disable running if the branch name starts with release.
In the same condition check, enable runs only for branches that are closed via a merge. We don't want to trigger CI for a PR that is closed because we decided to abandon the idea.
How to Test
Scenarios in my test repo, when running PRs from a fork:
--major
versioned re-run: https://github.com/jordigh/node-newrelic-testing-gha/actions/runs/5269064911/jobs/9526651087#step:7:103--minor
versioned run on main: https://github.com/jordigh/node-newrelic-testing-gha/actions/runs/5269330927/jobs/9527313867#step:2:373 https://github.com/jordigh/node-newrelic-testing-gha/actions/runs/5269330927/jobs/9527313867#step:7:99Note: this test repo has no secrets, which explains the CI failures.
Related Issues