Commit f2ad1b9
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- actions/bundle-size
- dist
5 files changed
+48436
-46496
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
| 12 | + | |
0 commit comments