-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Refactor: clean up github workflows for cache correctness #6029
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -127,7 +127,7 @@ export default defineConfig({ | |||
find: 'lexicalOriginal', | |||
replacement: path.resolve('../lexical/src/index.ts'), | |||
}, | |||
...moduleResolution('preview'), | |||
...moduleResolution('source'), |
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.
I don't know how this didn't get caught by the integrity check before it was merged?
# Run daily at 2:30am UTC | ||
# - cron: '30 2 * * 1-5' | ||
# remove the workflow_dispatch when this is turned on | ||
workflow_dispatch |
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.
I did this so I would stop getting emails about it on every push
* yaml package.json configuration, because we need to override the resolution | ||
* of modules to ensure we are pulling in monorepo build products as | ||
* dependencies rather than trying to use something stale from node_modules. | ||
*/ | ||
const glob = require('glob'); | ||
const path = require('node:path'); | ||
const fs = require('fs-extra'); |
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.
I noticed this unused import and typo when I was auditing the workflows
Description
We have a lot of test workflow. The workflows could get in various states where the cache was poisoned.
The cache correctness related changes:
cache: npm
option which also considers the node version, and should in theory do the right thing (the actions/cache docs recommend to not cache node_modules as we were doing)npm ci
. Maybe a little slower than caching node_modules, takes about 30s, but the global artifacts should be cached and we have a postinstall action to run for wxt with the lexical-devtools package which was the cause of some of the problems.Test plan
Before
Sometimes get strange build failures due to poisoned cache (hard to intentionally repro)
After