Skip to content

chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 #132

chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0

chore(deps): bump actions/setup-node from 6.4.0 to 7.0.0 #132

Workflow file for this run

name: Bundle Size Check
on:
pull_request:
types:
- opened
- synchronize
- reopened
jobs:
bundle-size:
name: Check Bundle Size
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Set up pnpm
uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9
with:
version: 11.1.2
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: 24
cache: pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run lint
run: pnpm run lint
- name: Run typecheck
run: pnpm run typecheck
- name: Run tests with coverage
run: pnpm run test:ci
- name: Publish test report
uses: dorny/test-reporter@a43b3a5f7366b97d083190328d2c652e1a8b6aa2 # v3.0.0
if: ${{ !cancelled() && github.event.pull_request.head.repo.full_name == github.repository && hashFiles('reports/vitest-junit.xml') != '' }}
with:
name: Vitest Tests
path: reports/vitest-junit.xml
reporter: java-junit
fail-on-error: false
- name: Add coverage summary
if: ${{ !cancelled() && hashFiles('coverage/coverage-summary.json') != '' }}
run: |
node <<'EOF'
const fs = require('node:fs');
const summary = JSON.parse(fs.readFileSync('coverage/coverage-summary.json', 'utf8')).total;
const metrics = ['lines', 'statements', 'functions', 'branches'];
const rows = metrics.map((metric) => {
const value = summary[metric];
const label = metric.charAt(0).toUpperCase() + metric.slice(1);
return `| ${label} | ${value.covered} | ${value.total} | ${value.pct}% |`;
});
fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, [
'## Coverage Summary',
'',
'| Metric | Covered | Total | Percent |',
'|---|---:|---:|---:|',
...rows,
'',
].join('\n'));
EOF
- name: Build action bundle
run: pnpm run build
- name: Prepare comparison fixture
run: |
mkdir -p bundle-size-fixture
printf 'module.exports = true;\n' > bundle-size-fixture/index.js
# Run the bundle-size action that lives in this repository.
# Because the action is defined here, we reference it with the
# special `./` prefix so GitHub Actions resolves it locally.
- name: Run Bundle Size Action
uses: ./
with:
path: "bundle-size-fixture"
package-name: "is-number"
files: |
index.js
output-file: "bundle-size-comparison.json"