From 37b69e67e09c41651ce3ae9787fc83d3d75b3668 Mon Sep 17 00:00:00 2001 From: Erick Zhao Date: Thu, 4 Dec 2025 14:23:23 -0800 Subject: [PATCH] ci: use `.nvmrc` file for CI --- .github/workflows/ci.yml | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b613417e0e..e3c89c9bb9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,9 +11,6 @@ on: types: [checks_requested] workflow_call: -env: - NODE_VERSION: 20.17.0 - jobs: lint-and-build: runs-on: ubuntu-22.04 @@ -21,11 +18,13 @@ jobs: - name: Configure git run: git config --global core.autocrlf input + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Setup Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: ${{ env.NODE_VERSION }} - # cache: yarn + node-version-file: .nvmrc # TODO(Forge 8): remove this once we can upgrade to `@electron/rebuild` v4 - name: Set up Python 3.11 (with distutils) @@ -33,9 +32,6 @@ jobs: with: python-version: 3.11 - - name: Checkout code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Install dependencies run: yarn install --immutable @@ -80,11 +76,13 @@ jobs: - name: Configure git run: git config --global core.autocrlf input + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Setup Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: ${{ env.NODE_VERSION }} - # cache: yarn + node-version-file: .nvmrc # TODO(Forge 8): remove this once we can upgrade to `@electron/rebuild` v4 - name: Set up Python 3.11 (with distutils) @@ -92,9 +90,6 @@ jobs: with: python-version: 3.11 - - name: Checkout code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Install dependencies run: yarn install --immutable @@ -156,11 +151,13 @@ jobs: - name: Configure git run: git config --global core.autocrlf input + - name: Checkout code + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + - name: Setup Node.js uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: ${{ env.NODE_VERSION }} - # cache: yarn + node-version-file: .nvmrc # TODO(Forge 8): remove this once we can upgrade to `@electron/rebuild` v4 - name: Set up Python 3.11 (with distutils) @@ -168,9 +165,6 @@ jobs: with: python-version: 3.11 - - name: Checkout code - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - - name: Install dependencies run: yarn install --immutable