-
Notifications
You must be signed in to change notification settings - Fork 57
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: only git fetch HEAD unless more is needed #5938
base: main
Are you sure you want to change the base?
Conversation
3c260c5
to
ba991f3
Compare
ba991f3
to
b9daa55
Compare
This pull request adds or modifies JavaScript ( |
const output = await new Fixture('./fixtures/basereldir').withFlags({ baseRelDir: false }).runWithConfig() | ||
const output = await new Fixture('./fixtures/basereldir') | ||
.withFlags({ baseRelDir: false }) | ||
.withEnv({ COMMIT_REF: 'abcdefabcdefabcdefabcdef', CACHED_COMMIT_REF: undefined }) |
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.
Learning: what's this change for?
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.
Sorry, I explained this in the separate commit but not in the PR!
This is one of those funny things about testing a build system on another build system :). It seems this snapshot test was unintentionally relying on some CI env vars related to the git checkout of the netlify/build
repo, when it was intending to be testing something related to a test fixture repo's git env vars.
When I changed the git checkout setup in our CI, it changed this snapshot test's result a bit. So I updated the test to explicitly pass the env it's expecting.
I would imagine if we changed all these tests to not inherit the outer env at all it would break a lot of things...
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.
... or at least I thought I did but it didn't actually fix it. I don't think the undefined
thing is working 😢.
Summary
Each CI job is fetching ~2000 git tags and branches plus the full history. It only takes 10s but it could be taking 1s instead!