-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
57 lines (53 loc) · 1.89 KB
/
Copy pathsize.yml
File metadata and controls
57 lines (53 loc) · 1.89 KB
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
47
48
49
50
51
52
53
54
55
56
57
name: Size
# Tracks tree-shaken scenario costs per PR (#2883). scripts/size/ is a
# standalone npm package OUTSIDE the pnpm workspace on purpose: adding its
# tooling to the workspace graph re-keys pnpm peer instances (vitest,
# @codspeed/vitest-plugin), which relocates the benchmark harness and shows
# up as phantom CodSpeed regressions. The limits in size/.size-limit.js are
# the strict tree-shaking gate; the retained-module-graph assertions in
# packages/solid-signals/tests/treeshake.test.ts stay the which-module
# diagnostic underneath.
on:
pull_request:
branches: [main, next]
permissions:
contents: read
pull-requests: write
jobs:
# The hard gate: self-contained on the PR head, fails when any scenario
# exceeds its limit. Never depends on the base branch.
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: npm ci --no-audit --no-fund
working-directory: scripts/size
- run: npm run size
working-directory: scripts/size
# Best-effort base-vs-head delta comment. Requires the base branch to also
# carry scripts/size/, so it is informational and never blocks: continue-on-error
# keeps bootstrap PRs (and any action hiccup) green.
compare:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: pnpm
- uses: andresz1/size-limit-action@v1
continue-on-error: true
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
package_manager: npm
directory: scripts/size
build_script: build