From 719f264ebc82fb19ddf6f28381f80e9ae689e704 Mon Sep 17 00:00:00 2001 From: fisker Cheung Date: Sun, 3 Apr 2022 01:42:41 +0800 Subject: [PATCH] Run size check on every PR (#12583) --- .github/workflows/check-sizes.yml | 26 ++++++++++++++++++++++++++ .github/workflows/prod-test.yml | 10 ---------- 2 files changed, 26 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/check-sizes.yml diff --git a/.github/workflows/check-sizes.yml b/.github/workflows/check-sizes.yml new file mode 100644 index 000000000..68b1bd877 --- /dev/null +++ b/.github/workflows/check-sizes.yml @@ -0,0 +1,26 @@ +name: Check Sizes + +on: + pull_request: + +jobs: + check-sizes: + name: Check Sizes + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + cache: "yarn" + + # This step calls `git reset` + # It should be the last step + - name: Check Sizes + uses: preactjs/compressed-size-action@2.5.0 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + pattern: "./dist/**/*" + compression: none diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml index 44c35d406..79635357a 100644 --- a/.github/workflows/prod-test.yml +++ b/.github/workflows/prod-test.yml @@ -32,16 +32,6 @@ jobs: name: dist path: dist - # This step calls `git reset` - # It should be the last step - - name: Check Sizes - if: ${{ github.event_name == 'pull_request' && startsWith(github.head_ref, 'dependabot/npm_and_yarn/') }} - uses: preactjs/compressed-size-action@2.5.0 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - pattern: "./dist/**/*" - compression: none - lint: name: Lint runs-on: ubuntu-latest