Skip to content

Compare size changes of your bundle over the time and new Pull Requests.

Notifications You must be signed in to change notification settings

effector/size-compare

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

size-compare

Compare size changes of your bundle over the time and new Pull Requests.

Usage

  1. Create new GIST and add README.md file with any content.
  2. Add ID of the gist into Secrets as SIZE_HISTORY_GIST_ID.
  3. Create personal access token with gist permission. Copy the token.
  4. Add the token into Secrets as SIZE_COMPARE_TOKEN.
  5. Create new Workflow file .github/workflows/size-compare.yml:
name: SizeCompare CI

on:
  push:
    branches:
      - main
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]
  workflow_dispatch:

jobs:
  size-compare:
    runs-on: ubuntu-latest
    steps:
      - name: 🛎️ Checkout
        uses: actions/checkout@v3

      # Add here your setup, installation, and build steps

      - name: 🚛 Size compare
        uses: effector/[email protected]
        with:
          gist_id: ${{ secrets.SIZE_HISTORY_GIST_ID }}
          gist_token: ${{ secrets.SIZE_COMPARE_TOKEN }}
          github_token: ${{ secrets.GITHUB_TOKEN }}
          files: |
            dist/**.js
            !dist/**.js.map

Inputs

Name Required Description
gist_id Yes Identifier of the GIST to save size history to
gist_token No Personal Access Token to read/write hist. If not passed github_token will be used. Useful for PRs from external contributors.
github_token Yes Token used to post comments for PRs.
files Yes List of glob patterns of files must be checked for size

About

Compare size changes of your bundle over the time and new Pull Requests.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published