From 04d65776858adaac662e6c0168a4ef2d32567a31 Mon Sep 17 00:00:00 2001 From: depapp Date: Tue, 27 Aug 2024 10:06:26 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20github=20actions=20improvement?= =?UTF-8?q?=20related=20to=20nodejs=20version=20rules?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7f32cf..8f199e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: - node-version: [14.x] + node-version: [14.x, 20.x, 22.x] # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: @@ -39,9 +39,21 @@ jobs: - name: install dependencies run: npm install + continue-on-error: ${{ matrix.node-version == '22.x' }} + + - name: check for unsupported engine warning + if: matrix.node-version == '22.x' + run: | + npm install 2>&1 | tee npm-install.log | grep "npm warn EBADENGINE Unsupported engine" + if [ $? -ne 0 ]; then + echo "Expected engine warning not found" + exit 1 + fi - name: symlink using npm-link run: npm link + if: matrix.node-version != '22.x' - name: run pusakatest - run: pusakatest -y \ No newline at end of file + run: pusakatest -y + if: matrix.node-version != '22.x' \ No newline at end of file