mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
Fix sizebot (#31535)
Our CI workflows generally cache `**/node_modules` (note the glob, it caches all transitive node_module directories) to speed up startup for new jobs that don't change any dependencies. However it seems like one of our caches got into a weird state (not sure how it happened) where the `build` directory (used in various other scripts as the directory for compiled React packages) would contain a `node_modules` directory as well. This made sizebot size change messages very big since it would try to compare every single file in `build/node_modules`. The fix is to ensure we always clean the `build` directory before doing anything with it. We can also delete that one problematic cache but this PR is a little more resilient to other weird behavior with that directory.
This commit is contained in:
@@ -75,6 +75,8 @@ jobs:
|
||||
with:
|
||||
path: "**/node_modules"
|
||||
key: runtime-release-node_modules-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'scripts/release/yarn.lock') }}
|
||||
- name: Ensure clean build directory
|
||||
run: rm -rf build
|
||||
- run: yarn install --frozen-lockfile
|
||||
name: yarn install (react)
|
||||
- run: yarn install --frozen-lockfile
|
||||
|
||||
Reference in New Issue
Block a user