From 341768e3eb8abf423f478e299652a247c7dfa1eb Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Mon, 5 Jul 2021 21:08:41 -0400 Subject: [PATCH] ci: update size --- .github/workflows/main.yaml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/size.yaml | 18 ------------------ 2 files changed, 32 insertions(+), 18 deletions(-) delete mode 100644 .github/workflows/size.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9b08758..7a3bcc9 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -71,3 +71,35 @@ jobs: - name: Run tests run: yarn test + + size: + name: Size + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [14] + steps: + - name: Check out + uses: actions/checkout@v2 + + - name: Set up Node ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Load yarn cache + uses: actions/cache@v2.1.6 + id: yarn-cache + with: + path: ./node_modules + key: ${{ runner.os }}-yarn-cache-${{ hashFiles('**/yarn.lock') }} + restore-keys: ${{ runner.os }}-yarn-cache- + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn --frozen-lockfile + + - uses: andresz1/size-limit-action@v1.5.1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + skip_step: install diff --git a/.github/workflows/size.yaml b/.github/workflows/size.yaml deleted file mode 100644 index 0c1a03b..0000000 --- a/.github/workflows/size.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Size - -on: - pull_request: - -jobs: - size: - name: Size - runs-on: ubuntu-latest - env: - CI_JOB_NUMBER: 1 - steps: - - name: Check out - uses: actions/checkout@v2 - - - uses: andresz1/size-limit-action@v1.5.1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }}