From 99ecdac235ca0336e94d8483340beae1ce16482d Mon Sep 17 00:00:00 2001 From: George Kudrayvtsev Date: Tue, 18 Jul 2023 13:48:39 -0700 Subject: [PATCH] Add GHA to check bundle size on PRs --- .github/workflows/bundle_size.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/bundle_size.yml diff --git a/.github/workflows/bundle_size.yml b/.github/workflows/bundle_size.yml new file mode 100644 index 000000000..1efbd8b34 --- /dev/null +++ b/.github/workflows/bundle_size.yml @@ -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" \ No newline at end of file