2024-05-30 17:08:28 +00:00
|
|
|
name: Compressed Size
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- '**.jsx?'
|
|
|
|
- '**.tsx?'
|
|
|
|
- '**.css'
|
|
|
|
- '**.scss'
|
|
|
|
- '**package*.json'
|
|
|
|
- '**.eslint*'
|
|
|
|
- '**.prettier*'
|
|
|
|
- '**.tsconfig*'
|
|
|
|
- '**/webpack.config.js'
|
2024-05-31 12:46:44 +00:00
|
|
|
- '!.github/**'
|
|
|
|
- '!packages/js/*e2e*/**'
|
|
|
|
- '!packages/js/*plugin*/**'
|
|
|
|
- '!packages/js/*internal*/**'
|
|
|
|
- '!packages/js/*create*/**'
|
|
|
|
- '!**/*.spec.*'
|
|
|
|
- '!**/tests/**'
|
|
|
|
- '!tools/**'
|
|
|
|
- '!changelog/**'
|
|
|
|
- '!docs/**'
|
|
|
|
- '!bin/**'
|
2024-05-30 17:08:28 +00:00
|
|
|
- '.github/workflows/pr-assess-bundle-size.yml'
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2024-09-30 14:39:16 +00:00
|
|
|
env:
|
|
|
|
FORCE_COLOR: 1
|
|
|
|
|
2024-05-30 17:08:28 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: Check Asset Sizes
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup WooCommerce Monorepo
|
|
|
|
uses: ./.github/actions/setup-woocommerce-monorepo
|
|
|
|
with:
|
2024-08-05 10:58:39 +00:00
|
|
|
php-version: false
|
2024-09-30 06:32:56 +00:00
|
|
|
install: '@woocommerce/plugin-woocommerce...'
|
|
|
|
build: '@woocommerce/plugin-woocommerce'
|
2024-07-23 12:21:05 +00:00
|
|
|
pull-package-deps: '@woocommerce/plugin-woocommerce'
|
|
|
|
|
2024-05-30 17:08:28 +00:00
|
|
|
- uses: preactjs/compressed-size-action@f780fd104362cfce9e118f9198df2ee37d12946c
|
2024-07-26 09:21:58 +00:00
|
|
|
env:
|
|
|
|
BROWSERSLIST_IGNORE_OLD_DATA: true
|
2024-05-30 17:08:28 +00:00
|
|
|
with:
|
|
|
|
repo-token: '${{ secrets.GITHUB_TOKEN }}'
|
2024-09-30 06:32:56 +00:00
|
|
|
pattern: './{packages/js/!(*e2e*|*internal*|*test*|*plugin*|*create*),plugins/woocommerce-blocks,plugins/woocommerce-admin,plugins/woocommerce/client/legacy}/{build,build-style}/**/*.{js,css}'
|
2024-08-01 21:15:10 +00:00
|
|
|
install-script: 'pnpm install --filter="@woocommerce/plugin-woocommerce..." --frozen-lockfile --config.dedupe-peer-dependents=false --ignore-scripts'
|
2024-07-26 09:21:58 +00:00
|
|
|
build-script: '--filter="@woocommerce/plugin-woocommerce" build'
|
2024-09-30 06:32:56 +00:00
|
|
|
clean-script: '--if-present clean:build'
|
2024-05-30 17:08:28 +00:00
|
|
|
minimum-change-threshold: 100
|
|
|
|
omit-unchanged: true
|