Skip to content

internal: Add bundle size tracker on PRs #18

internal: Add bundle size tracker on PRs

internal: Add bundle size tracker on PRs #18

Workflow file for this run

name: Bundle Size
on:
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
paths:
- 'packages/**'
- 'yarn.lock'
- 'examples/test-bundlesize/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'
- name: Install packages
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: true
run: |
# npm pkg delete workspaces[5]
# npm pkg delete workspaces[4]
# npm pkg delete workspaces[3]
# npm pkg delete workspaces[1]
corepack enable
yarn install
- name: Build packages
run: |
yarn workspaces foreach -Wptiv --no-private run build:lib
- name: compressed-size-action
uses: preactjs/compressed-size-action@v2
continue-on-error: true
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
build-script: "build:sizecompare"
pattern: "examples/test-bundlesize/dist/**/*.{js,json}"
exclude: "{examples/test-bundlesize/dist/manifest.json,**/*.LICENSE.txt,**/*.map,**/node_modules/**}"
minimum-change-threshold: 8