mirror of
https://github.com/ant-design/ant-design.git
synced 2025-01-18 14:13:37 +08:00
chore: improve size-limit-action (#39319)
* Update size-limit.yml * Update size-limit.yml * Update size-limit.yml * Update package.json * Update size-limit.yml * Update package.json * Update package.json * Update package.json * Update package.json * Update size-limit.yml * Update size-limit.yml * Update size-limit.yml
This commit is contained in:
parent
7b3adcb5ae
commit
df41ff73a8
42
.github/workflows/size-limit.yml
vendored
42
.github/workflows/size-limit.yml
vendored
@ -22,7 +22,41 @@ jobs:
|
||||
CI_JOB_NUMBER: 1
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: andresz1/size-limit-action@v1
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: cache package-lock.json
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: package-temp-dir
|
||||
key: lock-${{ github.sha }}
|
||||
|
||||
- name: create package-lock.json
|
||||
run: npm i --package-lock-only --ignore-scripts
|
||||
|
||||
- name: hack for single file
|
||||
run: |
|
||||
if [ ! -d "package-temp-dir" ]; then
|
||||
mkdir package-temp-dir
|
||||
fi
|
||||
cp package-lock.json package-temp-dir
|
||||
|
||||
- name: cache node_modules
|
||||
id: node_modules_cache_id
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: node_modules
|
||||
key: node_modules-${{ hashFiles('**/package-temp-dir/package-lock.json') }}
|
||||
|
||||
- name: install
|
||||
if: steps.node_modules_cache_id.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: size-limit
|
||||
uses: ant-design/size-limit-action@master
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
build_script: dist
|
||||
skip_step: install
|
||||
env:
|
||||
NODE_OPTIONS: --max_old_space_size=4096
|
||||
|
@ -167,7 +167,6 @@
|
||||
"@emotion/server": "^11.4.0",
|
||||
"@qixian.cs/github-contributors-list": "^1.0.3",
|
||||
"@size-limit/file": "^8.1.0",
|
||||
"@size-limit/webpack-why": "^8.1.0",
|
||||
"@stackblitz/sdk": "^1.3.0",
|
||||
"@testing-library/dom": "^8.17.1",
|
||||
"@testing-library/jest-dom": "^5.16.3",
|
||||
@ -312,11 +311,11 @@
|
||||
"size-limit": [
|
||||
{
|
||||
"path": "./dist/antd.min.js",
|
||||
"limit": "390 kB"
|
||||
"limit": "377 KiB"
|
||||
},
|
||||
{
|
||||
"path": "./dist/antd-with-locales.min.js",
|
||||
"limit": "450 kB"
|
||||
"limit": "430 KiB"
|
||||
}
|
||||
],
|
||||
"bundlesize": [
|
||||
|
Loading…
Reference in New Issue
Block a user