From a78968c68ee7526194ea78a0eb74e18f5dd5fea3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90=E1=BB=97=20Tr=E1=BB=8Dng=20H=E1=BA=A3i?= <41283691+hainenber@users.noreply.github.com> Date: Tue, 11 Feb 2025 02:52:36 +0700 Subject: [PATCH] chore(ci): consolidate Node version reference in CI to associated `.nvmrc` (#32192) Signed-off-by: hainenber --- .github/workflows/embedded-sdk-release.yml | 2 +- .github/workflows/embedded-sdk-test.yml | 2 +- .github/workflows/release.yml | 10 ++-------- .github/workflows/superset-applitool-cypress.yml | 3 +-- .github/workflows/superset-applitools-storybook.yml | 5 +---- .github/workflows/superset-docs-deploy.yml | 4 ++-- .github/workflows/superset-docs-verify.yml | 4 ++-- .github/workflows/superset-e2e.yml | 2 +- .github/workflows/superset-translations.yml | 2 +- .github/workflows/tech-debt.yml | 2 +- superset-embedded-sdk/.nvmrc | 1 + 11 files changed, 14 insertions(+), 23 deletions(-) create mode 100644 superset-embedded-sdk/.nvmrc diff --git a/.github/workflows/embedded-sdk-release.yml b/.github/workflows/embedded-sdk-release.yml index 66fd44bea..fc2a8fe36 100644 --- a/.github/workflows/embedded-sdk-release.yml +++ b/.github/workflows/embedded-sdk-release.yml @@ -31,7 +31,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version-file: './superset-embedded-sdk/.nvmrc' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm run ci:release diff --git a/.github/workflows/embedded-sdk-test.yml b/.github/workflows/embedded-sdk-test.yml index 3120608db..999d87337 100644 --- a/.github/workflows/embedded-sdk-test.yml +++ b/.github/workflows/embedded-sdk-test.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: "20" + node-version-file: './superset-embedded-sdk/.nvmrc' registry-url: 'https://registry.npmjs.org' - run: npm ci - run: npm test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3e76a1d14..513b3ac97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,13 +24,7 @@ jobs: needs: config if: needs.config.outputs.has-secrets name: Bump version and publish package(s) - runs-on: ubuntu-24.04 - - strategy: - matrix: - node-version: [20] - steps: - uses: actions/checkout@v4 with: @@ -46,11 +40,11 @@ jobs: git fetch --prune --unshallow git tag -d `git tag | grep -E '^trigger-'` - - name: Use Node.js ${{ matrix.node-version }} + - name: Install Node.js if: env.HAS_TAGS uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version-file: './superset-frontend/.nvmrc' - name: Cache npm if: env.HAS_TAGS diff --git a/.github/workflows/superset-applitool-cypress.yml b/.github/workflows/superset-applitool-cypress.yml index 0786abe41..44e8def8a 100644 --- a/.github/workflows/superset-applitool-cypress.yml +++ b/.github/workflows/superset-applitool-cypress.yml @@ -26,7 +26,6 @@ jobs: fail-fast: false matrix: browser: ["chrome"] - node: [20] env: SUPERSET_ENV: development SUPERSET_CONFIG: tests.integration_tests.superset_test_config @@ -66,7 +65,7 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version-file: './superset-frontend/.nvmrc' - name: Install npm dependencies uses: ./.github/actions/cached-dependencies with: diff --git a/.github/workflows/superset-applitools-storybook.yml b/.github/workflows/superset-applitools-storybook.yml index c0c6e83e0..44ed0451f 100644 --- a/.github/workflows/superset-applitools-storybook.yml +++ b/.github/workflows/superset-applitools-storybook.yml @@ -28,9 +28,6 @@ jobs: needs: config if: needs.config.outputs.has-secrets runs-on: ubuntu-24.04 - strategy: - matrix: - node: [20] steps: - name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )" uses: actions/checkout@v4 @@ -41,7 +38,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version-file: './superset-frontend/.nvmrc' - name: Install eyes-storybook dependencies uses: ./.github/actions/cached-dependencies with: diff --git a/.github/workflows/superset-docs-deploy.yml b/.github/workflows/superset-docs-deploy.yml index 3f03e482d..b827889eb 100644 --- a/.github/workflows/superset-docs-deploy.yml +++ b/.github/workflows/superset-docs-deploy.yml @@ -35,10 +35,10 @@ jobs: with: persist-credentials: false submodules: recursive - - name: Set up Node.js 20 + - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version-file: './docs/.nvmrc' - name: Setup Python uses: ./.github/actions/setup-backend/ - uses: actions/setup-java@v4 diff --git a/.github/workflows/superset-docs-verify.yml b/.github/workflows/superset-docs-verify.yml index b08bba091..e77e49166 100644 --- a/.github/workflows/superset-docs-verify.yml +++ b/.github/workflows/superset-docs-verify.yml @@ -60,10 +60,10 @@ jobs: with: persist-credentials: false submodules: recursive - - name: Set up Node.js 20 + - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version-file: './docs/.nvmrc' - name: yarn install run: | yarn install --check-cache diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index 85a22bf11..8e9702095 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -109,7 +109,7 @@ jobs: if: steps.check.outputs.python || steps.check.outputs.frontend uses: actions/setup-node@v4 with: - node-version: "20" + node-version-file: './superset-frontend/.nvmrc' - name: Install npm dependencies if: steps.check.outputs.python || steps.check.outputs.frontend uses: ./.github/actions/cached-dependencies diff --git a/.github/workflows/superset-translations.yml b/.github/workflows/superset-translations.yml index 94babe7c4..685d35cfe 100644 --- a/.github/workflows/superset-translations.yml +++ b/.github/workflows/superset-translations.yml @@ -33,7 +33,7 @@ jobs: if: steps.check.outputs.frontend uses: actions/setup-node@v4 with: - node-version: '18' + node-version-file: './superset-frontend/.nvmrc' - name: Install dependencies if: steps.check.outputs.frontend uses: ./.github/actions/cached-dependencies diff --git a/.github/workflows/tech-debt.yml b/.github/workflows/tech-debt.yml index 1aec723c0..887ebba69 100644 --- a/.github/workflows/tech-debt.yml +++ b/.github/workflows/tech-debt.yml @@ -32,7 +32,7 @@ jobs: - name: Set up Node.js uses: actions/setup-node@v4 with: - node-version: '20' + node-version-file: './superset-frontend/.nvmrc' - name: Install Dependencies run: npm install diff --git a/superset-embedded-sdk/.nvmrc b/superset-embedded-sdk/.nvmrc new file mode 100644 index 000000000..80a9956e1 --- /dev/null +++ b/superset-embedded-sdk/.nvmrc @@ -0,0 +1 @@ +v20.16.0