From 2ddfee409edbe030275a7900bdaf336027666a97 Mon Sep 17 00:00:00 2001 From: regexowl Date: Mon, 2 Sep 2024 13:55:24 +0200 Subject: [PATCH] test: Test with Node 20 only This updates the test env to test with Node 20 only, pr_check is also updated to use Node 20. The changes shouldn't affect users in any way, please let me know if you think it might. There were common async flakes when using testing-library with Node 18, those often surfaced in gh actions / pr_check only and did not reproduce locally unless resources got limited (I can reproduce some flakes in Power Saver mode only, leading me to conclusion, that it's just async being mischievous). Switching to testing with Node 20 only should also allow us to re-enable some tests that got disabled specifically because them running with Node 18 ended up in a time out. --- .github/workflows/dev-checks.yml | 10 +++------- pr_check.sh | 2 +- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/dev-checks.yml b/.github/workflows/dev-checks.yml index c76d1e90..11ec8cf1 100644 --- a/.github/workflows/dev-checks.yml +++ b/.github/workflows/dev-checks.yml @@ -5,19 +5,15 @@ on: branches: [ "main" ] jobs: - tests: + dev-check: runs-on: ubuntu-latest - strategy: - matrix: - node-version: [18.x, 20.x] - steps: - uses: actions/checkout@v4 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 20 uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node-version }} + node-version: 20 cache: 'npm' - name: Install dependencies run: npm ci diff --git a/pr_check.sh b/pr_check.sh index 917f4a18..fd6a07b5 100755 --- a/pr_check.sh +++ b/pr_check.sh @@ -10,7 +10,7 @@ export IMAGE="quay.io/cloudservices/image-builder-frontend" export WORKSPACE=${WORKSPACE:-$APP_ROOT} # if running in jenkins, use the build's workspace export APP_ROOT=$(pwd) #16 is the default Node version. Change this to override it. -export NODE_BUILD_VERSION=18 +export NODE_BUILD_VERSION=20 COMMON_BUILDER=https://raw.githubusercontent.com/RedHatInsights/insights-frontend-builder-common/master # --------------------------------------------