forked from strapi/strapi
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (36 loc) · 1.18 KB
/
adminBundleSize.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
name: Admin bundle-size
on:
pull_request:
paths:
- '**/admin/src/**.js'
- '**/ee/admin/**.js'
- '**/helper-plugin/src/**.js'
- '**/translations/**.json'
# Might be too broad, but it runs the action even if a
# package.json wasn't changed, e.g. for non-pinned dependencies
- 'yarn.lock'
jobs:
admin_size:
runs-on: ubuntu-latest
# Allows the action to comment on PRs
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Monorepo install
uses: ./.github/actions/yarn-nm-install
- name: Monorepo build
uses: ./.github/actions/run-build
- uses: preactjs/compressed-size-action@v2
with:
build-script: 'build:size'
pattern: '**/build/**/*.{js,css,html,svg}'
strip-hash: "\\.(?:(\\w{8})\\.chunk)|(?:\\.(\\w{8}))"
minimum-change-threshold: 10
# FIXME: exclude unnamed webpack chunks - remove once webpack
# does not create them anymore
exclude: '{**/build/**/+([0-9]{,4})*,**/node_modules/**}'