Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/effector/size-compare
Compare size changes of your bundle over the time and new Pull Requests.
https://github.com/effector/size-compare
code-quality github-actions
Last synced: about 2 months ago
JSON representation
Compare size changes of your bundle over the time and new Pull Requests.
- Host: GitHub
- URL: https://github.com/effector/size-compare
- Owner: effector
- Created: 2022-10-05T14:58:44.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-08-03T04:22:40.000Z (over 1 year ago)
- Last Synced: 2024-10-29T18:42:59.478Z (2 months ago)
- Topics: code-quality, github-actions
- Language: TypeScript
- Homepage:
- Size: 553 KB
- Stars: 11
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# size-compare
Compare size changes of your bundle over the time and new Pull Requests.
## Usage
1. [Create new GIST](https://gist.github.com/) 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](https://github.com/settings/tokens) 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`:```yaml
name: SizeCompare CIon:
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](https://github.com/actions/toolkit/tree/main/packages/glob#patterns) of files must be checked for size |