Skip to content

Commit

Permalink
test: Add size-limit to watch dist size (#35)
Browse files Browse the repository at this point in the history
* test: Add size-limit to watch dist size

* Test

* Remove comment

* WIP

* WIP

* Update sizes
  • Loading branch information
alexnault authored Apr 16, 2023
1 parent 56e5826 commit 43ce5ea
Show file tree
Hide file tree
Showing 6 changed files with 991 additions and 110 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -28,7 +28,7 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
with:
node-version: 16
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: ci

on:
Expand All @@ -14,7 +11,7 @@ jobs:
matrix:
node-version: [12.x, 14.x, 16.x]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
Expand All @@ -26,3 +23,10 @@ jobs:
- run: npm run build
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
size:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
13 changes: 13 additions & 0 deletions .size-limit.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{
"name": "JS Minified",
"path": "dist/*.js",
"gzip": false,
"limit": "1610B"
},
{
"name": "JS Compressed",
"path": "dist/*.js",
"limit": "748B"
}
]
Loading

0 comments on commit 43ce5ea

Please sign in to comment.