From 696289646517ee817acff668965b39cb5fcc2dc1 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote Date: Thu, 15 Oct 2020 17:37:00 +0200 Subject: [PATCH] ci: add size check integration (#2369) --- .circleci/config.yml | 14 ++------------ .github/workflows/size-check.yml | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/size-check.yml diff --git a/.circleci/config.yml b/.circleci/config.yml index de7e22aa..bb2a2df1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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 diff --git a/.github/workflows/size-check.yml b/.github/workflows/size-check.yml new file mode 100644 index 00000000..bf63447e --- /dev/null +++ b/.github/workflows/size-check.yml @@ -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