From 01f63f964ef370b85e3b9d16975eb883dd55e718 Mon Sep 17 00:00:00 2001 From: Brian White Date: Wed, 25 Dec 2024 15:12:28 -0500 Subject: [PATCH] ci: attempt to fix issues related to old node-gyp + new Python --- .github/workflows/ci.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 565fd9d..342bda6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,11 +22,13 @@ jobs: node-version: ${{ matrix.node-version }} - name: Check Node.js version run: node -pe process.versions - - name: Install Python 2.7 - if: ${{ matrix.node-version == '10.7.0' }} + - name: Check npm version + run: npm -v + - name: Install latest node-gyp (node <16.x) + if: ${{ contains(fromJSON('["10.7.0", "10.x", "12.x", "14.x"]'), matrix.node-version) }} run: | - sudo apt install python2.7 - echo "PYTHON=$(which python2.7)" >> "$GITHUB_ENV" + sudo npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm install node-gyp@latest + sudo npm explore npm/node_modules/@npmcli/run-script -g -- npm_config_global=false npm ls --depth=0 node-gyp - name: Install module run: npm install - name: Run tests @@ -51,6 +53,8 @@ jobs: python-version: '3.10' - name: Check Node.js version run: node -pe process.versions + - name: Check npm version + run: npm -v - name: Install module run: npm install - name: Run tests @@ -71,6 +75,8 @@ jobs: node-version: ${{ matrix.node-version }} - name: Check Node.js version run: node -pe process.versions + - name: Check npm version + run: npm -v - name: Install module run: npm install - name: Run tests