From 6acff38dcfa76b412543cc365b4b3a0cb17833fb Mon Sep 17 00:00:00 2001 From: faisal-alvi Date: Fri, 14 Jun 2024 20:23:18 +0530 Subject: [PATCH] update workflows --- .github/workflows/cypress.yml | 18 ++++++------------ .github/workflows/lint.yml | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 06590ed..8f1f1f1 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -37,20 +37,14 @@ jobs: run: ls -R working-directory: ${{ github.event.repository.name }} - - name: Cache node_modules - id: cache-node-modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules + - name: Setup node and npm cache + uses: actions/setup-node@v4 with: - path: | - node_modules - ~/.cache - ~/.npm - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + node-version-file: .nvmrc + cache: npm - - name: Install dependencies - run: npm install + - name: Install Node dependencies + run: npm ci --no-optional - name: Set the core version and plugins config run: ./tests/bin/set-wp-config.js --core=${{ matrix.core.version }} --plugins=./${{ github.event.repository.name }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index e3732bd..806f816 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup node v16 and npm cache + - name: Setup node and npm cache uses: actions/setup-node@v4 with: node-version-file: .nvmrc