From c627118f2850d3826f936f728af4da2ccdeb2466 Mon Sep 17 00:00:00 2001 From: JohnAlbin Date: Wed, 17 Apr 2024 15:03:20 +0800 Subject: [PATCH] ci(next-drupal): work-around for flakey code coverage reporting Issue #740 --- .github/workflows/next-drupal.yml | 6 ++++++ .nvmrc | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/next-drupal.yml b/.github/workflows/next-drupal.yml index c937f531..b381f4c9 100644 --- a/.github/workflows/next-drupal.yml +++ b/.github/workflows/next-drupal.yml @@ -14,6 +14,12 @@ jobs: with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} + # TODO: Work-around for failing code coverage. + # https://github.com/chapter-three/next-drupal/issues/740 + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.19.x' - name: Install packages run: yarn - name: Run tests diff --git a/.nvmrc b/.nvmrc index 3f430af8..ca84069c 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1,5 @@ -v18 +v18.19 + +# @TODO v18.20 and v20.10 and later have a bug that causes Jest code coverage to randomly fail. When the tracking bug is fixed, switch to the less-specific "v18" or "v20" version. See https://github.com/chapter-three/next-drupal/issues/740 + +# Note: This is a non-standard .nvmrc comment. Currently, nvm ignores all lines except the 1st line so we are hijacking this implementation detail to add comments to this file. See https://github.com/nvm-sh/nvm/pull/2288#issuecomment-1115079020