From fa89f99b7b7936b846e2a80e5831204b2bd9d74a Mon Sep 17 00:00:00 2001 From: Gustav Hansen Date: Thu, 9 Feb 2023 20:14:05 +0100 Subject: [PATCH] GH: Add bundle-size reporter --- .github/workflows/adminBundleSize.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/adminBundleSize.yml diff --git a/.github/workflows/adminBundleSize.yml b/.github/workflows/adminBundleSize.yml new file mode 100644 index 0000000000..18c063c2db --- /dev/null +++ b/.github/workflows/adminBundleSize.yml @@ -0,0 +1,26 @@ +name: Admin bundle-size + +on: + pull_request: + paths: + - '**/admin/src/**.js' + - '**/helper-plugin/lib/src/**.js' + - '**/translations/**.json' + - 'yarn.lock' + +jobs: + admin_size: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 18 + cache: yarn + + - uses: preactjs/compressed-size-action@v2 + with: + pattern: '**/build/**/*.{js,css,html,svg}' + strip-hash: "\\.(?:(\\w{8})\\.chunk)|(?:\\.(\\w{8}))"