Skip to content

Commit f2ad1b9

Browse files
authored
feat: allow overriding runtime path for bundle size check (#652)
Not all modules built with aegir are destined to be consumed in a browser, but as currently implemented the size check will run for every package in a monorepo, which may then fail if one of those packages cannot be built as a browser bundle - if it uses node core modules, for example. The change here is to allow passing a directory path in which to run the size check, this way monorepos can specify the modules they want tested by using a build matrix: ```yaml on: pull_request: branches: - '*' name: Bundlesize jobs: check: runs-on: ubuntu-latest strategy: matrix: node-version: [12.x] project: - packages/module-1 - packages/module-2 - packages/etc steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - name: Install dependencies run: npm install - name: Bundlesize ${{ matrix.project }} uses: ipfs/aegir/actions/bundle-size@feat/opt-in-to-size-check with: project: ${{ matrix.project }} github_token: ${{ secrets.GITHUB_TOKEN }} ```
1 parent e478259 commit f2ad1b9

File tree

5 files changed

+48436
-46496
lines changed

5 files changed

+48436
-46496
lines changed

actions/bundle-size/action.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
name: 'Bundle Size'
2-
description: 'Bundle size action for IPFS repos.'
2+
description: 'Bundle size action for IPFS repos'
33
inputs:
44
github_token:
55
description: The GITHUB_TOKEN secret
66
required: true
7+
project:
8+
description: A directory to run the bundle check in
9+
required: false
710
runs:
811
using: 'node12'
9-
main: 'dist/index.js'
12+
main: 'dist/index.js'

0 commit comments

Comments
 (0)