From 3bbc5a76a094625afe24171217b62e05db0e7872 Mon Sep 17 00:00:00 2001 From: Nick Pachulski Date: Wed, 17 Jul 2024 03:54:37 -0400 Subject: [PATCH] Use the exact same node version locally as in CI Apparently, there's a difference in jest's V8 test reporting coverage depending on which version of node is being used. https://github.com/nodejs/node/issues/51251 According to the folks talking about that issue in their repo, here: https://github.com/chapter-three/next-drupal/issues/740#issuecomment-2061262348 They tested and found that the coverage discrepancy occurs in node 18 after upgrading from version 18.19.1 to version 18.20.0. It also occurs in node 20 after upgrading from version 20.9.0 to version 20.10.0. Locally, we have been using 18.18.2 where V8 coverage reporting still appears to be working correctly for us, but CI is reporting something else (since it's only pinned to version 18 prior to this commit). Since 18.18.2 seems to work for us, and the folks commenting in the linked issue seem to agree that the issue shouldn't appear for us in that version, we'll keep using node version 18.18.2 locally and explicitly instruct GH actions to also use that version of nodejs. --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d044fb1..19f1135 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18.18.2 cache: "yarn" - name: Install Dependencies run: yarn install @@ -30,7 +30,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18.18.2 cache: "yarn" - name: Install Dependencies run: yarn install @@ -46,7 +46,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18.18.2 cache: "yarn" - name: Install Dependencies run: yarn install @@ -62,7 +62,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18.18.2 cache: "yarn" - name: Install Dependencies run: yarn install @@ -94,7 +94,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18.18.2 cache: yarn - name: Setup EAS @@ -120,7 +120,7 @@ jobs: - name: Setup Node uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 18.18.2 cache: "yarn" - name: Install Dependencies