Monorepo: speedup 'Check Asset Sizes' job. (#49793)

In this PR, we are improving the job execution time by leveraging available cached resources, refining the build artifacts cleaning approach between calculating asset sizes.
This commit is contained in:
Vladimir Reznichenko 2024-07-23 14:21:05 +02:00 committed by GitHub
parent 572b497ec7
commit 81cf40e8b3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -44,10 +44,12 @@ jobs:
# Both install and build are handled by compressed-size-action.
install: false
build: false
pull-package-deps: '@woocommerce/plugin-woocommerce'
- uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks}/{build,build-style}/**/*.{js,css}'
clean-script: '--if-present distclean'
clean-script: '--if-present buildclean'
minimum-change-threshold: 100
omit-unchanged: true

View File

@ -23,7 +23,7 @@
"lint": "pnpm -r lint",
"cherry-pick": "node ./tools/cherry-pick/bin/run",
"clean": "rimraf -g '**/node_modules' '**/.wireit' && pnpm store prune && pnpm i",
"distclean": "git clean --force -d -X",
"buildclean": "git clean --force -d -X ./packages ./plugins ./tools",
"preinstall": "npx only-allow pnpm",
"postinstall": "pnpm git:update-hooks",
"git:update-hooks": "if test -d .git; then rm -rf .git/hooks && mkdir -p .git/hooks && husky install; else husky install; fi",