From 318174a976ab2d3f68b2808e6035bde09de1e073 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 11 Apr 2025 13:46:58 -0400 Subject: [PATCH 1/2] Upgrade node.js to 20 LTS Try to upgrade our node version. --- .nvmrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.nvmrc b/.nvmrc index ef33d6510196..5f53e875de68 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v18.20.1 +v20.19.0 From 8b38201be567de1e2e6015e42b0e103e538e3491 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 11 Apr 2025 13:53:40 -0400 Subject: [PATCH 2/2] [ci] Only checkout if no cache hit We don't need to do a checkout for the node_modules cache jobs if there's a cache hit. Saves a few seconds. --- .github/workflows/runtime_build_and_test.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/runtime_build_and_test.yml b/.github/workflows/runtime_build_and_test.yml index 1d0a896984e2..858080626abd 100644 --- a/.github/workflows/runtime_build_and_test.yml +++ b/.github/workflows/runtime_build_and_test.yml @@ -26,9 +26,6 @@ jobs: name: Cache Runtime node_modules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Check cache hit uses: actions/cache/restore@v4 id: node_modules @@ -37,6 +34,10 @@ jobs: **/node_modules key: runtime-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock') }} lookup-only: true + - uses: actions/checkout@v4 + if: steps.node_modules.outputs.cache-hit != 'true' + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: actions/setup-node@v4 if: steps.node_modules.outputs.cache-hit != 'true' with: @@ -67,9 +68,6 @@ jobs: name: Cache Runtime, Compiler node_modules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Check cache hit uses: actions/cache/restore@v4 id: node_modules @@ -78,6 +76,10 @@ jobs: **/node_modules key: runtime-and-compiler-node_modules-v6-${{ runner.arch }}-${{ runner.os }}-${{ hashFiles('yarn.lock', 'compiler/yarn.lock') }} lookup-only: true + - uses: actions/checkout@v4 + if: steps.node_modules.outputs.cache-hit != 'true' + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: actions/setup-node@v4 if: steps.node_modules.outputs.cache-hit != 'true' with: