From b675db6e61e02e68c3a8ef743a3f6e10fc75495f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gregorio=20Palam=C3=A0?= Date: Mon, 29 Jan 2024 17:41:47 +0100 Subject: [PATCH] Updated to node 20, install pnpm --- .github/workflows/axe.yml | 19 +++++++++++++++++-- .github/workflows/lighthouse.yml | 19 +++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/.github/workflows/axe.yml b/.github/workflows/axe.yml index b7bff3f3..a43af985 100644 --- a/.github/workflows/axe.yml +++ b/.github/workflows/axe.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 @@ -20,7 +20,22 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: "pnpm" + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + 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: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - run: pnpm ci - run: pnpm run build --if-present - run: pnpm run dev & npx wait-on http://localhost:4321 diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index d70b1ddd..43e261e6 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] steps: - uses: actions/checkout@v3 @@ -20,7 +20,22 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: "pnpm" + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + 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: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- - run: pnpm install && npm install -g @lhci/cli@0.8.x - run: pnpm run build - name: Run lighthouse