mirror of
https://github.com/strapi/strapi.git
synced 2026-06-02 16:27:47 +00:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Admin bundle-size
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '**/admin/src/**.js'
|
|
- '**/ee/admin/**.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@v6
|
|
|
|
- uses: actions/setup-node@v6
|
|
with:
|
|
node-version: 24
|
|
|
|
- name: Monorepo install
|
|
uses: ./.github/actions/yarn-nm-install
|
|
|
|
- name: Create install-and-build script
|
|
run: printf '#!/bin/sh\nset -e\nyarn install\nyarn build\n' > /tmp/install-and-build.sh
|
|
|
|
- uses: preactjs/compressed-size-action@v2
|
|
with:
|
|
install-script: 'sh /tmp/install-and-build.sh'
|
|
build-script: 'build:size'
|
|
pattern: '**/build/**/*.{js,css,html,svg}'
|
|
strip-hash: "-([-\\w]{8})(\\.\\w+)$"
|
|
minimum-change-threshold: '5%'
|
|
|
|
# FIXME: exclude unnamed webpack chunks - remove once webpack
|
|
# does not create them anymore
|
|
exclude: '{**/build/**/+([0-9]{,4})*,**/node_modules/**}'
|