From 1ab9c5bb2337908fb3f99f3a71c59259e224e28a Mon Sep 17 00:00:00 2001 From: umaranis Date: Tue, 5 Dec 2023 17:33:11 +1100 Subject: [PATCH 1/2] perf: github action for size-limit on PR --- .github/workflows/size.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/size.yml diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml new file mode 100644 index 0000000..5267a6e --- /dev/null +++ b/.github/workflows/size.yml @@ -0,0 +1,30 @@ +name: Size + +on: + pull_request: + branches: + - master +permissions: + pull-requests: write +jobs: + size: + runs-on: ubuntu-latest + env: + CI_JOB_NUMBER: 1 + steps: + - uses: actions/checkout@v1 + - uses: andresz1/size-limit-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + directory: demos/playground + package_manager: pnpm + - uses: andresz1/size-limit-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + directory: demos/richtext-editor + package_manager: pnpm + - uses: andresz1/size-limit-action@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + directory: demos/plaintext-editor + package_manager: pnpm From f13187a79f049cce67ddd888efc125d148795ea7 Mon Sep 17 00:00:00 2001 From: umaranis Date: Tue, 5 Dec 2023 18:12:29 +1100 Subject: [PATCH 2/2] perf: size-limit seperate job for each package --- .github/workflows/size.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index 5267a6e..c71853b 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -7,7 +7,7 @@ on: permissions: pull-requests: write jobs: - size: + size-plaintext: runs-on: ubuntu-latest env: CI_JOB_NUMBER: 1 @@ -17,14 +17,23 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} directory: demos/playground - package_manager: pnpm + size-richtext: + runs-on: ubuntu-latest + env: + CI_JOB_NUMBER: 1 + steps: + - uses: actions/checkout@v1 - uses: andresz1/size-limit-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} directory: demos/richtext-editor - package_manager: pnpm + size-playground: + runs-on: ubuntu-latest + env: + CI_JOB_NUMBER: 1 + steps: + - uses: actions/checkout@v1 - uses: andresz1/size-limit-action@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} - directory: demos/plaintext-editor - package_manager: pnpm + directory: demos/playground