From dfaf21308396208c9f46934ab55bd5d790873701 Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Tue, 11 May 2021 13:25:08 +0800 Subject: [PATCH] chore: workflows --- .github/workflows/e2e.yml | 18 ++++++++++++------ .github/workflows/size-check.yml | 29 ++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 240b977d1b..70b7b7e545 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -34,22 +34,28 @@ jobs: - name: Set dependencies cache uses: actions/cache@v2 with: - path: | - ~/.cache - ${{ steps.yarn-cache.outputs.dir }} + path: ${{ steps.yarn-cache.outputs.dir }} key: ${{ runner.os }}-node${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }} restore-keys: | ${{ runner.os }}-node${{ matrix.node_version }}-${{ hashFiles('yarn.lock') }} ${{ runner.os }}-node${{ matrix.node_version }}- + - name: Cache Cypress binary + uses: actions/cache@v2 + with: + path: ~/.cache/Cypress + key: ${{ runner.os }}-cypress-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-cypress- + - name: Versions run: yarn versions - name: Install dependencies run: yarn install --frozen-lockfile - - name: Build all - run: npm run build + - name: Build + run: npm run build uni-app uni-cli-shared uni-h5 uni-i18n uni-shared vite-plugin-uni - name: Install ssr working-directory: ./packages/playground/ssr @@ -58,7 +64,7 @@ jobs: - name: Cypress run uses: cypress-io/github-action@v2 with: - install: false + install: true start: npm run e2e:ssr:dev project: ./packages/playground/ssr wait-on: 'http://localhost:3000' diff --git a/.github/workflows/size-check.yml b/.github/workflows/size-check.yml index 9988fd838e..eab17643ce 100644 --- a/.github/workflows/size-check.yml +++ b/.github/workflows/size-check.yml @@ -13,7 +13,34 @@ jobs: CI_JOB_NUMBER: 1 steps: - uses: actions/checkout@v1 - - uses: bahmutov/npm-install@v1 + + - name: Get yarn cache directory + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + + - name: Set dependencies cache + uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }} + ${{ runner.os }}-node- + + - name: Cache Cypress binary + uses: actions/cache@v2 + with: + path: ~/.cache/Cypress + key: ${{ runner.os }}-cypress-${{ hashFiles('yarn.lock') }} + restore-keys: | + ${{ runner.os }}-cypress- + + - name: Versions + run: yarn versions + + - name: Install dependencies + run: yarn install --frozen-lockfile + - uses: fxy060608/size-check-action@v1.1.3 with: github_token: ${{ secrets.GITHUB_TOKEN }} -- GitLab