CI: speedup 'Check Asset Sizes' job (take 3) (#50178)

* CI: attempt 3 to speedup 'Check Asset Sizes' job.

* CI: cleanup

* CI: changelog entry.
This commit is contained in:
Vladimir Reznichenko 2024-08-01 23:15:10 +02:00 committed by GitHub
parent fa3d8233da
commit a3f4d722b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 13 additions and 12 deletions

View File

@ -52,7 +52,7 @@ jobs:
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks}/{build,build-style}/**/*.{js,css}'
install-script: 'pnpm install --filter="@woocommerce/plugin-woocommerce..." --frozen-lockfile --config.dedupe-peer-dependents=false'
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'
minimum-change-threshold: 100

View File

@ -1,9 +0,0 @@
const fs = require( 'fs-extra' );
const path = require( 'path' );
const rootNodeModules = path.join( __dirname, '..', 'node_modules' );
fs.ensureSymlinkSync(
path.join( rootNodeModules, 'xstate5' ),
path.join( rootNodeModules, '@xstate5', 'react', 'node_modules', 'xstate' )
);

View File

@ -29,8 +29,7 @@
"watch:build": "pnpm --if-present --workspace-concurrency=Infinity --filter=\"$npm_package_name...\" --parallel '/^watch:build:project:.*$/'",
"watch:build:project": "pnpm --if-present run '/^watch:build:project:.*$/'",
"watch:build:project:bundle": "wireit",
"watch:build:project:feature-config": "WC_ADMIN_PHASE=development php ../woocommerce/bin/generate-feature-config.php",
"postinstall": "node ./bin/xstate5-react-script.js"
"watch:build:project:feature-config": "WC_ADMIN_PHASE=development php ../woocommerce/bin/generate-feature-config.php"
},
"lint-staged": {
"*.scss": [

View File

@ -94,6 +94,13 @@ const getEntryPoints = () => {
// WordPress.orgs translation infrastructure ignores files named “.min.js” so we need to name our JS files without min when releasing the plugin.
const outputSuffix = WC_ADMIN_PHASE === 'core' ? '' : '.min';
// Here we are patching a dependency, see https://github.com/woocommerce/woocommerce/pull/45548 for more details.
// Should be revisited: using the dependency patching, but seems we need some codebase tweaks as it uses xstate 4/5 mix.
require( 'fs-extra' ).ensureSymlinkSync(
path.join( __dirname, './node_modules/xstate5' ),
path.join( __dirname, './node_modules/@xstate5/react/node_modules/xstate' )
);
const webpackConfig = {
mode: NODE_ENV,
entry: getEntryPoints(),

View File

@ -0,0 +1,4 @@
Significance: patch
Type: dev
CI: speedup assets size verification job execution time.