forked from woocommerce/woocommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 2.26 KB
/
pr-assess-bundle-size.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Compressed Size
on:
pull_request:
paths:
- '**.jsx?'
- '**.tsx?'
- '**.css'
- '**.scss'
- '**package*.json'
- '**.eslint*'
- '**.prettier*'
- '**.tsconfig*'
- '**/webpack.config.js'
- '!.github/**'
- '!packages/js/*e2e*/**'
- '!packages/js/*plugin*/**'
- '!packages/js/*internal*/**'
- '!packages/js/*create*/**'
- '!**/*.spec.*'
- '!**/tests/**'
- '!tools/**'
- '!changelog/**'
- '!docs/**'
- '!bin/**'
- '.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
env:
FORCE_COLOR: 1
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:
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,plugins/woocommerce/client/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 clean:build'
minimum-change-threshold: 100
omit-unchanged: true