Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add BundleMon action to check the build size changes #307

Open
wants to merge 10 commits into
base: development
Choose a base branch
from
22 changes: 22 additions & 0 deletions .bundlemonrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"baseDir": "./build",
"groups": [
{
"path": "./**/*",
"friendlyName": "Build Folder",
"compression": "gzip",
"maxSize": "2.5 MB",
"maxPercentIncrease": "20"
}
],
"reportOutput": [
[
"github",
{
"checkRun": true,
"commitStatus": true,
"prComment": true
}
]
]
}
35 changes: 35 additions & 0 deletions .github/workflows/bundlemon_build_size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: "PR Build Diff"

on:
push:
branches: ["master", "development"]
pull_request:
branches: [ "master", "development" ]
workflow_dispatch:

jobs:
build-size-check:
runs-on: self-hosted

steps:
# Check out base (target) branch at the commit where the PR branched off
- name: Check out base branch
uses: actions/checkout@v4

# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v4
with:
# Use the Node.js version specified in the .nvmrc file
node-version-file: '.nvmrc'
cache: 'yarn'

# Install and build
- name: Install and build
run: |
yarn install
yarn build

- name: BundleMon
uses: lironer/bundlemon-action@v1

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@typescript-eslint/eslint-plugin": "5.4.0",
"@typescript-eslint/parser": "5.4.0",
"@welldone-software/why-did-you-render": "6.2.3",
"bundlemon": "2.1.0",
"cmd-ts": "0.7.0",
"craco": "0.0.3",
"cypress-xpath": "1.6.2",
Expand Down
Loading
Loading