-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CI: switch to actions/checkout@v2
#600
Conversation
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.
Small change to the ci.yml
file. The change doesn't need to be reflected in benchmark.yml
because we're not using the repo really.
Note to future selves (@npm/cli-team): might be worth removing that git checkout
from the yaml.
@@ -13,7 +13,7 @@ jobs: | |||
|
|||
steps: | |||
# Checkout the npm/cli repo | |||
- uses: actions/checkout@v1 | |||
- uses: actions/checkout@v2 |
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.
The fetch depth defaults to 1
with the new version of actions/checkout
. Ordinarily I don't think this would matter, but we've seen some weirdness with depth: 1
checkouts, and I'd rather avoid this for now. We can always adjust this later in the future.
- uses: actions/checkout@v2 | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 |
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.
From the docs on actions/checkout
# Number of commits to fetch. 0 indicates all history.
# Default: 1
fetch-depth: ''
I don't agree you need this, unless it causes problems, which it shouldn't. |
To elaborate more, the whole point of this patch is to make use of the new defaults which includes depth 1, which in turn speeds things up. So, unless this causes a problem, there's no reason to proactively change the defaults. |
We'll validate the changes don't break things on our release branch, and if they don't we'll pull the changes in :) |
Should speed things up a bit.