From a51e209e1c641ac71874a87e44eeef509c6356b3 Mon Sep 17 00:00:00 2001 From: Tim Roberts Date: Sat, 10 Feb 2024 11:48:56 -0500 Subject: [PATCH] Try again --- .github/workflows/node_test.yaml | 41 +++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/node_test.yaml b/.github/workflows/node_test.yaml index c255f6d..7ee5376 100644 --- a/.github/workflows/node_test.yaml +++ b/.github/workflows/node_test.yaml @@ -2,24 +2,37 @@ name: Test Node on: [push] jobs: - build: - runs-on: ubuntu-20.04 - strategy: - matrix: - node-version: [20] + cache-and-install: + runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v3 + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Node.js + uses: actions/setup-node@v3 + with: + node-version: 20 + cache-dependency-path: "client" + - uses: pnpm/action-setup@v3 + name: Install pnpm with: version: 8 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache with: - node-version: ${{ matrix.node-version }} - cache: "pnpm" - - name: Enter Directory - run: cd client + 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 - - name: Run tests - run: pnpm test