From 42f353e5e9aa82c02d8da669a3e8e06ee0657f6c Mon Sep 17 00:00:00 2001 From: zhangmo8 Date: Wed, 10 Jul 2024 19:24:40 +0800 Subject: [PATCH] [Bugfix] fix CI [Bugfix] fix CI [Bugfix] fix CI --- .github/workflows/frontend-ci.yml | 43 +++++++++++++++++++------------ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/.github/workflows/frontend-ci.yml b/.github/workflows/frontend-ci.yml index 64e283da6..307f38cc0 100644 --- a/.github/workflows/frontend-ci.yml +++ b/.github/workflows/frontend-ci.yml @@ -19,25 +19,36 @@ on: [push, pull_request] jobs: build: - runs-on: ubuntu-latest + timeout-minutes: 5 + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [20] - + # pseudo-matrix for convenience, NEVER use more than a single combination + node: [20] + os: [ubuntu-latest] steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - name: install pnpm + shell: bash + run: | + PNPM_VER=9.5.0 + echo installing pnpm version $PNPM_VER + npm i -g pnpm@$PNPM_VER + working-directory: paimon-web-ui - - name: Checkout code - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + cache: 'pnpm' + cache-dependency-path: '**/pnpm-lock.yaml' - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20.x' + - name: install + run: pnpm install --frozen-lockfile --prefer-offline --ignore-scripts + working-directory: paimon-web-ui - - name: Install dependencies - run: npm install - working-directory: paimon-web-ui - - - name: Build - run: npm run build - working-directory: paimon-web-ui + - name: Build + run: pnpm run build + working-directory: paimon-web-ui