Skip to content

Commit

Permalink
Use the exact same node version locally as in CI
Browse files Browse the repository at this point in the history
Apparently, there's a difference in jest's V8 test reporting coverage
depending on which version of node is being used.

nodejs/node#51251

According to the folks talking about that issue in their repo, here:

chapter-three/next-drupal#740 (comment)

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.
  • Loading branch information
pachun committed Jul 17, 2024
1 parent eabd9e6 commit 3bbc5a7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3bbc5a7

Please sign in to comment.