From 9d1e5de398c51ff4ec6371b0250306ed3f81c00b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Thu, 24 Aug 2023 15:47:27 +0900 Subject: [PATCH] cache pnpm --- .github/workflows/CI.yml | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ca60ac6..0c60f8e 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -29,22 +29,35 @@ jobs: with: fetch-depth: 2 + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - uses: pnpm/action-setup@v2.0.1 with: version: 8.6.3 + run_install: false - - uses: nanasess/setup-chromedriver@v2 - - run: | - chromedriver --url-base=/wd/hub & + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - name: Setup Node.js environment - uses: actions/setup-node@v3 + - uses: actions/cache@v3 + name: Setup pnpm cache with: - node-version: 18 - cache: "pnpm" + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - name: Install dependencies run: pnpm install + - uses: nanasess/setup-chromedriver@v2 + - run: | + chromedriver --url-base=/wd/hub & + - name: Test run: pnpm turbo run test:ci