From 895fe6adfe409c83b737f9d2ed8544b6a5372283 Mon Sep 17 00:00:00 2001 From: boyuanx Date: Fri, 1 Mar 2024 12:16:27 -0700 Subject: [PATCH] Update CI to use pnpm --- .github/workflows/main-push-pull.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main-push-pull.yml b/.github/workflows/main-push-pull.yml index b323296..8ebfa2d 100644 --- a/.github/workflows/main-push-pull.yml +++ b/.github/workflows/main-push-pull.yml @@ -17,21 +17,27 @@ jobs: - name: Check out code uses: actions/checkout@v3 - - uses: actions/cache@v3 - name: Set up cache + - name: Setup pnpm + uses: pnpm/action-setup@v2.4.0 with: - path: ~/.npm - key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - restore-keys: | - ${{ runner.os }}-node- + version: 8 + run_install: false - - name: Set up node - uses: actions/setup-node@v3 + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - name: Setup pnpm cache + uses: actions/cache@v3 with: - node-version: '20' + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies - run: npm i + run: pnpm i --frozen-lockfile - name: Build application run: npm run build