CI: Use nvmrc in all github workflows (#107164)

feat(gh-workflows): use nvmrc file as single source of truth for projects node version
This commit is contained in:
Jack Westbrook 2025-06-25 10:41:16 +02:00 committed by GitHub
parent 6e28464981
commit 8179c87ebe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 11 deletions

View File

@ -34,7 +34,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22.16.0
node-version-file: '.nvmrc'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
@ -86,7 +86,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22.16.0
node-version-file: '.nvmrc'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
@ -136,7 +136,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22.16.0
node-version-file: '.nvmrc'
- name: Get built packages from pr
uses: actions/download-artifact@v4

View File

@ -3,7 +3,7 @@ name: Run e2e for dashboardNewLayouts
on:
pull_request:
branches:
- '**'
- '**'
paths:
- 'e2e/dashboard-new-layouts/**'
- 'public/app/features/dashboard-scene/**'
@ -28,7 +28,7 @@ jobs:
- run: go version
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable

View File

@ -35,7 +35,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22.16.0'
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies

View File

@ -36,7 +36,7 @@ jobs:
- run: go version
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Cache Node Modules
id: cache-node-modules

View File

@ -6,7 +6,7 @@ on:
- main
pull_request:
branches:
- '**'
- '**'
env:
ARCH: linux-amd64
@ -28,7 +28,7 @@ jobs:
- run: go version
- uses: actions/setup-node@v4
with:
node-version: 20
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
@ -40,7 +40,7 @@ jobs:
runTests: false
- name: Run dashboard scenes e2e
run: yarn e2e:schema-v2 || echo "Test failed but marking as success since schema V2 is behind a feature flag and should not block PRs"
- name: Always succeed # This is a workaround to make the job pass even if the previous step fails
if: failure()
run: exit 0

View File

@ -32,7 +32,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: 'package.json'
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies