From 8179c87ebec80e77422d64e834c7b788194ea04f Mon Sep 17 00:00:00 2001 From: Jack Westbrook Date: Wed, 25 Jun 2025 10:41:16 +0200 Subject: [PATCH] CI: Use nvmrc in all github workflows (#107164) feat(gh-workflows): use nvmrc file as single source of truth for projects node version --- .github/workflows/detect-breaking-changes-levitate.yml | 6 +++--- .github/workflows/e2e-dashboard-new-layouts.yml | 4 ++-- .github/workflows/lint-build-docs.yml | 2 +- .github/workflows/run-dashboard-search-e2e.yml | 2 +- .github/workflows/run-schema-v2-e2e.yml | 6 +++--- .github/workflows/storybook-verification.yml | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/detect-breaking-changes-levitate.yml b/.github/workflows/detect-breaking-changes-levitate.yml index 9f02c839b71..9ddb9489ab6 100644 --- a/.github/workflows/detect-breaking-changes-levitate.yml +++ b/.github/workflows/detect-breaking-changes-levitate.yml @@ -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 diff --git a/.github/workflows/e2e-dashboard-new-layouts.yml b/.github/workflows/e2e-dashboard-new-layouts.yml index a93ef052666..b2b5d1f8215 100644 --- a/.github/workflows/e2e-dashboard-new-layouts.yml +++ b/.github/workflows/e2e-dashboard-new-layouts.yml @@ -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 diff --git a/.github/workflows/lint-build-docs.yml b/.github/workflows/lint-build-docs.yml index 233474d58ac..f4fd7d7a2f0 100644 --- a/.github/workflows/lint-build-docs.yml +++ b/.github/workflows/lint-build-docs.yml @@ -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 diff --git a/.github/workflows/run-dashboard-search-e2e.yml b/.github/workflows/run-dashboard-search-e2e.yml index ca1d6d4f940..8554f7549a6 100644 --- a/.github/workflows/run-dashboard-search-e2e.yml +++ b/.github/workflows/run-dashboard-search-e2e.yml @@ -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 diff --git a/.github/workflows/run-schema-v2-e2e.yml b/.github/workflows/run-schema-v2-e2e.yml index aa8a11c4c7f..a13b953648b 100644 --- a/.github/workflows/run-schema-v2-e2e.yml +++ b/.github/workflows/run-schema-v2-e2e.yml @@ -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 diff --git a/.github/workflows/storybook-verification.yml b/.github/workflows/storybook-verification.yml index fa5b6dfd3ea..2777836d5cb 100644 --- a/.github/workflows/storybook-verification.yml +++ b/.github/workflows/storybook-verification.yml @@ -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