ci: a new prep-deps workflow with caching (#29979) #30863
Draft
+1,278
−534
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
prep-deps
There's a new workflow that parallels the CircleCI workflow.
prep-deps
runs first and caches the result, thenprep-build-test-webpack
makes an artifact, then the benchmarks run.Several of the existing workflows were changed to now depend on
prep-deps
Many of the file changes are just using the new
checkout-and-setup@caching
and deleting the independent "Checkout repository" stepvars.USE_CACHINGNo longer using thisThis allows us to toggle the caching feature on and off in a centralized way. I left instructions as a comment inmain.yml
for how to toggle it. We can discuss implementing this in a different way, but passing this variable through different workflows is actually kind of a pain (that's the first way I implemented it). Several of the jobs are 30-60 seconds faster when this is turned on.test-short-suiterepository-health-checksI think this could be slightly controversial, but I think it's for the better.
I noticed that there were 7 individual really short tests, that each ran on their own VM. Each VM instance took about 1m30s to execute. I combined these together into a single VM that runs all the short tests in sequence, and takes about 1m20s combined. The
if: always()
statements make all independent tests run, even if one fails.The 7 jobs were:
test-lint-shellcheck, test-lint-changelog, test-lint-lockfile, test-deps-audit, test-yarn-dedupe, test-deps-depcheck, validate-lavamoat-allow-scripts
If this were running on VMs that cost money, this would be a no-brainer. As is on GitHub runners, it doesn't really cost us any time or money. All we can really say is 7 separate jobs burn fossil fuels for a slight bit of convenience in terms of seeing individual test failures in the GitHub PR page.
Depends on feat: GitHub-hosted runners for benchmarks #29955MERGEDMerge thisMERGEDcaching
branch ofgithub-tools
: ci: new checkout-and-setup to support prep-deps and caching github-tools#42Changecheckout-and-setup@caching
andcheckout-and-setup-secure@caching
to new@hash
Split off from: #29955
Description
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist