Browse Source

chore: update size-limit.yml (#39338)

pull/39353/head
afc163 2 years ago
committed by GitHub
parent
commit
20158b2277
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 42
      .github/workflows/size-limit.yml

42
.github/workflows/size-limit.yml

@ -22,8 +22,40 @@ jobs:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v3
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
script: npx size-limit --json --why
- 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

Loading…
Cancel
Save