Skip to content

Enhancement/12577 extend goal drivers #13990

Enhancement/12577 extend goal drivers

Enhancement/12577 extend goal drivers #13990

name: Compressed Size
on:
pull_request:
branches:
- develop
- main
- 'feature/**'
types:
- opened
- reopened
- synchronize
paths:
- '.github/workflows/compressed-size.yml'
- 'assets/**/*.js'
- '!assets/**/*.test.js'
- '!assets/**/test/**'
- 'assets/**/*.scss'
- 'assets/svg/**/*.svg'
- './*.config.js'
- './package-lock.json'
concurrency:
group: compressed-size-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Check
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.event.pull_request.draft == false
permissions:
pull-requests: write
steps:
- uses: actions/checkout@v6
- name: Setup Node.js (.nvmrc)
uses: actions/setup-node@v6
with:
node-version-file: .nvmrc
cache: npm
- uses: preactjs/compressed-size-action@v2
with:
install-script: npm ci --workspace=assets --include-workspace-root
repo-token: '${{ secrets.GITHUB_TOKEN }}'
pattern: './dist/assets/**/*.{css,js}'
# The sub-match below will be replaced by asterisks.
# The length of 20 corresponds to webpack's `output.hashDigestLength`.
strip-hash: "([a-f0-9]{20})(?:\\.min)?\\.(?:css|js)$"
minimum-change-threshold: 1000 # 1KB