1
0
mirror of https://github.com/flarum/core.git synced 2025-08-08 09:26:34 +02:00

Add bundlewatch to track bundle size changes in PRs (#2695)

(Below steps already performed, but kept for future reference.)

Head here to get auth ID: https://service.bundlewatch.io/setup-github
Create repo secret called `BUNDLEWATCH_GITHUB_TOKEN` with the token inside
This commit is contained in:
David Wheatley
2021-03-17 14:54:42 +00:00
committed by GitHub
parent 233b97329c
commit 298f6c39f2
4 changed files with 633 additions and 0 deletions

40
.github/workflows/pr_size_change.yml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: Bundle size checker
on:
workflow_dispatch:
push:
paths:
- "js/**"
pull_request:
paths:
- "js/**"
jobs:
bundlewatch:
runs-on: ubuntu-latest
name: Bundlewatch
steps:
- uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: "12"
- name: Install JS dependencies
run: npm ci
working-directory: ./js
- name: Build production assets
run: npm run build
working-directory: ./js
- name: Check bundle size change
run: node_modules/.bin/bundlewatch --config .bundlewatch.config.json
working-directory: ./js
env:
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
CI_COMMIT_SHA: ${{ github.event.pull_request.head.sha }}