Skip to content

Commit

Permalink
[dev] CI: tweaks in assets sizes verification job for better performa…
Browse files Browse the repository at this point in the history
…nce and coverage (woocommerce#51761)

In this PR we refine cleaning build artifacts to build-folders only and leverage wireit integration in GitHub actions for leveraging incremental build approach in the job and improving the job running time.
  • Loading branch information
kalessil authored Sep 30, 2024
1 parent 1943850 commit f756b48
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pr-assess-bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,18 @@ jobs:
uses: ./.github/actions/setup-woocommerce-monorepo
with:
php-version: false
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
pull-package-deps: '@woocommerce/plugin-woocommerce'

- uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c
env:
BROWSERSLIST_IGNORE_OLD_DATA: true
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks}/{build,build-style}/**/*.{js,css}'
pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks,plugins/woocommerce-admin,plugins/woocommerce/client/legacy}/{build,build-style}/**/*.{js,css}'
install-script: 'pnpm install --filter="@woocommerce/plugin-woocommerce..." --frozen-lockfile --config.dedupe-peer-dependents=false --ignore-scripts'
build-script: '--filter="@woocommerce/plugin-woocommerce" build'
clean-script: '--if-present buildclean'
clean-script: '--if-present clean:build'
minimum-change-threshold: 100
omit-unchanged: true
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"lint": "pnpm -r lint",
"cherry-pick": "node ./tools/cherry-pick/bin/run",
"clean": "rimraf -g '**/node_modules' '**/.wireit' && pnpm store prune",
"buildclean": "git clean --force -d -X ./packages ./plugins ./tools",
"clean:build": "rimraf -g 'packages/js/*/build' 'packages/js/*/build-*' 'packages/js/*/dist' 'plugins/*/build' 'plugins/woocommerce/client/legacy/build' && git clean --force -d -X --quiet ./plugins/woocommerce/assets",
"preinstall": "npx only-allow pnpm",
"postinstall": "husky",
"sync-dependencies": "pnpm exec syncpack -- fix-mismatches",
Expand Down

0 comments on commit f756b48

Please sign in to comment.