You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by wa...@apache.org on 2024/01/25 10:12:45 UTC

(incubator-fury) branch main updated: chore(JavaScript): fix test ci on early Node (#1356)

This is an automated email from the ASF dual-hosted git repository.

wangweipeng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


The following commit(s) were added to refs/heads/main by this push:
     new 01ad634f chore(JavaScript): fix test ci on early Node (#1356)
01ad634f is described below

commit 01ad634f5bea9f088af8e32575748ef73a8de3e9
Author: weipeng <wa...@apache.org>
AuthorDate: Thu Jan 25 18:12:41 2024 +0800

    chore(JavaScript): fix test ci on early Node (#1356)
    
    1. Npm 6 doesn't support workspace, upgrade it before run test
    2. There are Some node-gyp compile problems on windows, ignore it
    temporary
    #1350
---
 .github/workflows/ci.yml             | 2 ++
 ci/run_ci.sh                         | 3 +--
 javascript/jest.config.js            | 2 +-
 javascript/packages/hps/package.json | 3 ++-
 4 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index df5ffb8a..c95a07b6 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -117,6 +117,8 @@ jobs:
         uses: actions/setup-node@v3
         with:
           node-version: ${{ matrix.node-version }}
+      - name: Upgrade npm
+        run: npm install -g npm@8
       - name: Run CI with NodeJS
         run: ./ci/run_ci.sh javascript
 
diff --git a/ci/run_ci.sh b/ci/run_ci.sh
index 44448e20..61caaab3 100755
--- a/ci/run_ci.sh
+++ b/ci/run_ci.sh
@@ -201,8 +201,7 @@ case $1 in
       testcode=$?
       if [[ $testcode -ne 0 ]]; then
         echo "Executing fury javascript tests failed"
-        # TODO(bigtech) enable js ci
-        # exit $testcode
+        exit $testcode
       fi
       echo "Executing fury javascript tests succeeds"
     ;;
diff --git a/javascript/jest.config.js b/javascript/jest.config.js
index 4b9f5e81..ce814269 100644
--- a/javascript/jest.config.js
+++ b/javascript/jest.config.js
@@ -19,7 +19,7 @@
 
 /** @type {import('ts-jest').JestConfigWithTsJest} */
 const semver = require("semver");
-const hpsEnable = semver.gt(process.versions.node, '20.0.0')
+const hpsEnable = semver.gt(process.versions.node, '20.0.0') && process.platform !== 'win32';
 
 module.exports = {
   collectCoverage: hpsEnable,
diff --git a/javascript/packages/hps/package.json b/javascript/packages/hps/package.json
index 4febf187..fdce6f02 100644
--- a/javascript/packages/hps/package.json
+++ b/javascript/packages/hps/package.json
@@ -8,8 +8,9 @@
     "src",
     "binding.gyp"
   ],
+  "gypfile": false,
   "scripts": {
-    "postinstall": "npx node-gyp rebuild",
+    "postinstall": "node -e \"if (process.version.match(/v(\\d+)/)[1] >= 20 && process.platform !== 'win32') { require('child_process').execSync('npx node-gyp rebuild') } \"",
     "build": "npx node-gyp rebuild && tsc",
     "prepublishOnly": "npm run build"
   },


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org