mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-27 12:39:49 +08:00
chore: fix size-limit action (#39268)
* chore: fix size-limit action * Update .github/workflows/size-limit.yml * Apply suggestions from code review * Apply suggestions from code review
This commit is contained in:
parent
c9d8b89e25
commit
6614faee50
31
.github/workflows/compressed-size.yml
vendored
31
.github/workflows/compressed-size.yml
vendored
@ -1,31 +0,0 @@
|
||||
name: 📦 Compressed Size
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
# Cancel prev CI if new commit come
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
compressed-size:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
pull-requests: write # for preactjs/compressed-size-action to create PR comments
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_JOB_NUMBER: 1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: preactjs/compressed-size-action@v2
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
pattern: "./dist/**/*.min.{js,css}"
|
||||
build-script: "dist:esbuild-no-dup-check"
|
||||
clean-script: "clean-lockfiles"
|
14
.github/workflows/size-limit.yml
vendored
14
.github/workflows/size-limit.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: 📦 Compressed Size(size-limit)
|
||||
name: 📦 Size Limit
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@ -13,10 +13,10 @@ permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
compressed-size:
|
||||
size:
|
||||
permissions:
|
||||
contents: read # for actions/checkout to fetch code
|
||||
pull-requests: write # for preactjs/compressed-size-action to create PR comments
|
||||
contents: read
|
||||
pull-requests: write
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CI_JOB_NUMBER: 1
|
||||
@ -25,7 +25,5 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: andresz1/size-limit-action@v1
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
pattern: "./dist/**/*.min.{js,css}"
|
||||
build-script: "dist:esbuild-no-dup-check"
|
||||
clean-script: "clean-lockfiles"
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: npx size-limit --json --why
|
||||
|
@ -167,6 +167,7 @@
|
||||
"@emotion/server": "^11.4.0",
|
||||
"@qixian.cs/github-contributors-list": "^1.0.3",
|
||||
"@size-limit/file": "^8.0.0",
|
||||
"@size-limit/preset-big-lib": "^8.1.0",
|
||||
"@stackblitz/sdk": "^1.3.0",
|
||||
"@testing-library/dom": "^8.17.1",
|
||||
"@testing-library/jest-dom": "^5.16.3",
|
||||
@ -316,13 +317,17 @@
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "./dist/antd.min.js",
|
||||
"limit": "375 kB"
|
||||
"limit": "390 kB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/antd-with-locales.min.js",
|
||||
"limit": "450 kB"
|
||||
}
|
||||
],
|
||||
"bundlesize": [
|
||||
{
|
||||
"path": "./dist/antd.min.js",
|
||||
"maxSize": "377.5 kB"
|
||||
"maxSize": "377 kB"
|
||||
}
|
||||
],
|
||||
"tnpm": {
|
||||
|
Loading…
Reference in New Issue
Block a user