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

SiyaoIsHiding pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra-nodejs-driver.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 6f563cca CASSNODEJS-12: Deno and Bun support patch by Jane He; 
reviewed by Jorge Bay and Kavin Gupta
6f563cca is described below

commit 6f563cca53ff563d8385152bb3263984bb8179df
Author: Jane He <[email protected]>
AuthorDate: Thu Jun 11 16:23:31 2026 -0700

    CASSNODEJS-12: Deno and Bun support
    patch by Jane He; reviewed by Jorge Bay and Kavin Gupta
---
 .../{test.yml => integration-bun-deno.yml}         | 116 ++++++---------------
 .github/workflows/test.yml                         |  23 ++++
 2 files changed, 53 insertions(+), 86 deletions(-)

diff --git a/.github/workflows/test.yml 
b/.github/workflows/integration-bun-deno.yml
similarity index 63%
copy from .github/workflows/test.yml
copy to .github/workflows/integration-bun-deno.yml
index 19d0c023..b5be8cc1 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/integration-bun-deno.yml
@@ -1,56 +1,22 @@
-name: Unit and Integration Tests for Apache Cassandra NodeJS Driver
+name: Bun and Deno Integration Tests
 
 on:
   push:
-  pull_request:
-  workflow_dispatch: # allow manual trigger from Actions page
+    branches: [trunk] 
+  workflow_dispatch:
+
 permissions:
   contents: read
   actions: read
   checks: write
-jobs:
-  eslint:
-    name: Run eslint
-    runs-on: ubuntu-latest
-    steps:
-      - uses: actions/checkout@v4
-      - uses: actions/setup-node@v4
-        with:
-          node-version: 20
-          cache: "npm"
-      - run: npm install -g eslint@4
-      - run: npm run eslint
-
-  typescript:
-    name: TypeScript generation and compilation tests
-    runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        NODE_VERSION: ["20", "22", "24"]
-        TSC_VERSION: ["4.9", "5.9", "6.0"]
-      fail-fast: false
-    steps:
-      - uses: actions/checkout@v4
-      - uses: actions/setup-node@v4
-        with:
-          node-version: ${{ matrix.NODE_VERSION }}
-          cache: "npm"
-
-      - run: npm ci
-
-      - run: npm install typescript@${{ matrix.TSC_VERSION }} --no-save
 
-      - run: |
-          pushd test/unit/typescript/
-          npx tsc
-          node -e "require('./api-generation-test').generate()" > generated.ts
-          npx tsc --noEmit
-
-  unit-integration-tests:
+jobs:
+  integration-tests:
+    name: Integration (${{ matrix.RUNTIME }}, Cassandra ${{ 
matrix.SERVER_VERSION }})
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        NODE_VERSION: ["20", "22", "24"]
+        RUNTIME: ["bun", "deno"]
         SERVER_VERSION: ["3.11", "4.0", "4.1", "5.0"] # Cassandra minor 
versions
       fail-fast: false
 
@@ -153,11 +119,18 @@ jobs:
         run: |
           wget 
https://github.com/datastax/simulacron/releases/download/0.12.0/simulacron-standalone-0.12.0.jar
 -O /home/runner/simulacron.jar
 
-      - name: Set up Node.js
-        uses: actions/setup-node@v4
+      # ---- Set up the runtime under test ----
+      - name: Set up Bun
+        if: matrix.RUNTIME == 'bun'
+        uses: oven-sh/setup-bun@v2
+        with:
+          bun-version: latest
+
+      - name: Set up Deno
+        if: matrix.RUNTIME == 'deno'
+        uses: denoland/setup-deno@v2
         with:
-          node-version: ${{ matrix.NODE_VERSION }}
-          cache: "npm"
+          deno-version: latest
 
       - name: Resolve Cassandra latest patch version
         env:
@@ -181,44 +154,15 @@ jobs:
           ccm create predownload -v $CCM_VERSION
           ccm remove
 
-      - name: Run tests
+      - name: Run integration tests (${{ matrix.RUNTIME }})
         run: |
-          npm ci
-          npm install --no-save mocha-multi-reporters mocha-junit-reporter
-          echo '{
-            "reporterEnabled": "spec, mocha-junit-reporter",
-            "mochaJunitReporterReporterOptions": {
-              "mochaFile": "test-results/results.xml"
-            }
-          }' > config.json
-
-          npx mocha test/unit test/integration/short --recursive --exit 
--reporter mocha-multi-reporters \
-            --reporter-options configFile=config.json
-
-      - name: Upload Test Results
-        if: (!cancelled())
-        uses: actions/upload-artifact@v4
-        with:
-          name: Test Results (Node.js ${{ matrix.NODE_VERSION }}, Cassandra 
${{ matrix.SERVER_VERSION }})
-          path: test-results/**/*
-
-  publish-test-results:
-    name: "Publish Tests Results"
-    needs: unit-integration-tests
-    runs-on: ubuntu-latest
-    permissions:
-      checks: write
-      pull-requests: write
-
-    if: (!cancelled())
-
-    steps:
-      - name: Download Artifacts
-        uses: actions/download-artifact@v4
-        with:
-          path: artifacts
-
-      - name: Publish Test Results
-        uses: EnricoMi/publish-unit-test-result-action@v2
-        with:
-          files: artifacts/**/*.xml
+          if [ "${{ matrix.RUNTIME }}" = "bun" ]; then
+            # Bun has full CommonJS support, so mocha runs unchanged.
+            bun install
+            bunx mocha test/integration/short --recursive --exit -R spec -t 
5000
+          else
+            # --allow-scripts builds the kerberos native addon; 
--unstable-detect-cjs
+            # makes Deno load the CommonJS driver and tests correctly.
+            deno install --allow-scripts=npm:kerberos
+            deno run -A --unstable-detect-cjs npm:mocha test/integration/short 
--recursive --exit -R spec -t 5000
+          fi
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 19d0c023..1decd2c4 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -46,6 +46,29 @@ jobs:
           node -e "require('./api-generation-test').generate()" > generated.ts
           npx tsc --noEmit
 
+  bun-unit-tests:
+    name: Unit tests on Bun
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: oven-sh/setup-bun@v2
+        with:
+          bun-version: latest
+      - run: bun install
+      - run: bunx mocha test/unit --recursive -R spec -t 5000
+
+  deno-unit-tests:
+    name: Unit tests on Deno
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v4
+      - uses: denoland/setup-deno@v2
+        with:
+          deno-version: latest
+      # --allow-scripts runs lifecycle scripts so the kerberos prebuild is 
fetched.
+      - run: deno install --allow-scripts=npm:kerberos
+      - run: deno run -A --unstable-detect-cjs npm:[email protected] test/unit 
--recursive -R spec -t 5000
+
   unit-integration-tests:
     runs-on: ubuntu-latest
     strategy:


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to