ci: add size check integration (#2369)

This commit is contained in:
Eduardo San Martin Morote 2020-10-15 17:37:00 +02:00 committed by GitHub
parent 5c37efeccc
commit 6962896465
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 12 deletions

View File

@ -7,8 +7,8 @@ defaults: &defaults
step_restore_cache: &restore_cache
restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}-1
- v1-dependencies-
- v1-dependencies-{{ checksum "yarn.lock" }}-1
- v1-dependencies-
step_install_deps: &install_deps
run:
@ -45,19 +45,9 @@ jobs:
- *save_cache
- run: yarn test-dts
check-size:
<<: *defaults
steps:
- checkout
- *restore_cache
- *install_deps
- *save_cache
- run: yarn size
workflows:
version: 2
ci:
jobs:
- test
- test-dts
- check-size

19
.github/workflows/size-check.yml vendored Normal file
View File

@ -0,0 +1,19 @@
name: 'size'
on:
pull_request:
branches:
- master
jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
- uses: bahmutov/npm-install@v1
- uses: posva/size-check-action@v1.0.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: size
files: packages/vue/dist/vue.global.prod.js packages/runtime-dom/dist/runtime-dom.global.prod.js packages/size-check/dist/size-check.global.prod.js