Skip to content

Commit

Permalink
Add GitHub Action to check bundle size on new PRs (#852)
Browse files Browse the repository at this point in the history
  • Loading branch information
Shaptic committed Aug 15, 2023
1 parent 2a0b4e8 commit 0c99413
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/bundle_size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Bundle Size

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Node.js 16
uses: actions/setup-node@v3
with:
node-version: 16

# Workaround for some `yarn` nonsense, see:
# https://github.com/yarnpkg/yarn/issues/6312#issuecomment-429685210
- name: Install Dependencies
run: yarn install --network-concurrency 1

- name: Build All
run: yarn build:prod

- name: Report Bundle Size
uses: preactjs/compressed-size-action@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
pattern: "dist/*.js"
compression: "none"

0 comments on commit 0c99413

Please sign in to comment.