From 04424d3c269d696948632250544b928d48b02b56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 5 Sep 2024 11:46:24 +0200 Subject: [PATCH] fix(gha) make sure the chosen Node version is used --- .github/workflows/ci_spot-client.yml | 17 ++++++++++------- .github/workflows/ci_spot-electron.yml | 12 +++--------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci_spot-client.yml b/.github/workflows/ci_spot-client.yml index 88e31af38..5ded04d11 100644 --- a/.github/workflows/ci_spot-client.yml +++ b/.github/workflows/ci_spot-client.yml @@ -12,9 +12,7 @@ jobs: - name: Step 2 - setup node uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' - cache-dependency-path: spot-client/package-lock.json + node-version-file: '.nvmrc' - name: Step 3 - run install working-directory: 'spot-client' @@ -39,19 +37,24 @@ jobs: - name: Step 2 - checkout uses: actions/checkout@v4 - - name: Step 3 - run install [spot-client] + - name: Step 3 - setup node + uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + + - name: Step 4 - run install [spot-client] working-directory: spot-client run: npm install - - name: Step 4 - run install [spot-webdriver] + - name: Step 5 - run install [spot-webdriver] working-directory: spot-webdriver run: npm install - - name: Step 5 - run tests [spot-webdriver] + - name: Step 6 - run tests [spot-webdriver] working-directory: spot-webdriver run: npm run ci - - name: Step 6 - Archive Test Results + - name: Step 7 - Archive Test Results if: always() uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/ci_spot-electron.yml b/.github/workflows/ci_spot-electron.yml index b27097468..7c15dde13 100644 --- a/.github/workflows/ci_spot-electron.yml +++ b/.github/workflows/ci_spot-electron.yml @@ -12,9 +12,7 @@ jobs: - name: Step 2 - setup node uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' - cache-dependency-path: spot-electron/package-lock.json + node-version-file: '.nvmrc' - name: Step 3 - run install working-directory: 'spot-electron' @@ -35,9 +33,7 @@ jobs: - name: Step 2 - setup node uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' - cache-dependency-path: spot-electron/package-lock.json + node-version-file: '.nvmrc' - name: Step 3 - run install working-directory: 'spot-electron' @@ -58,9 +54,7 @@ jobs: - name: Step 2 - setup node uses: actions/setup-node@v4 with: - node-version: 20 - cache: 'npm' - cache-dependency-path: spot-electron/package-lock.json + node-version-file: '.nvmrc' - name: Step 3 - run install working-directory: 'spot-electron'