Skip to content

Commit 5cb935d

Browse files
ci: report bundle size with preactjs/compressed-size-action (#153)
1 parent afac388 commit 5cb935d

4 files changed

Lines changed: 27 additions & 65 deletions

File tree

.github/workflows/pr.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,30 @@ jobs:
141141

142142
- name: Publish preview packages
143143
run: pnpx pkg-pr-new publish --pnpm --owner=stijnvanhulle --repo=https://github.com/stijnvanhulle/template.git './packages/*'
144+
145+
compressed-size:
146+
name: Compressed size
147+
timeout-minutes: 15
148+
runs-on: ubuntu-latest
149+
permissions:
150+
contents: read
151+
pull-requests: write
152+
if: github.actor != 'github-actions[bot]' && github.event_name == 'pull_request'
153+
steps:
154+
- name: Check out code
155+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
156+
with:
157+
fetch-depth: 0
158+
persist-credentials: false
159+
160+
- name: Setup Tools
161+
uses: ./.github/setup
162+
with:
163+
node-version: '22'
164+
165+
- name: Report compressed bundle size
166+
uses: preactjs/compressed-size-action@66325aad6443cb7cf89c4bfcd414aea2367cda94 # v2
167+
with:
168+
repo-token: ${{ secrets.GITHUB_TOKEN }}
169+
build-script: 'build'
170+
pattern: './packages/*/dist/**/*.{js,mjs,cjs}'

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,12 @@
3535
"devDependencies": {
3636
"@changesets/changelog-github": "^0.6.0",
3737
"@changesets/cli": "^2.31.0",
38-
"@size-limit/file": "catalog:",
3938
"@types/node": "catalog:",
4039
"@vitest/coverage-v8": "catalog:",
4140
"@vitest/ui": "catalog:",
4241
"bun-types": "^1.3.14",
4342
"oxfmt": "catalog:",
4443
"oxlint": "catalog:",
45-
"size-limit": "catalog:",
4644
"taze": "^19.14.1",
4745
"ts-node": "^10.9.2",
4846
"tsdown": "catalog:",

pnpm-lock.yaml

Lines changed: 0 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ allowBuilds:
77
es5-ext: true
88
esbuild: true
99
catalog:
10-
'@size-limit/file': ^12.1.0
1110
'@types/node': ^22.19.19
1211
'@vitest/coverage-v8': ^4.1.7
1312
'@vitest/ui': ^4.1.7
1413
oxfmt: ^0.47.0
1514
oxlint: ^1.67.0
16-
'size-limit': ^12.1.0
1715
tsdown: ^0.22.0
1816
typescript: ^6.0.3
1917
vitest: ^4.1.7

0 commit comments

Comments
 (0)