diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f9f1eb9a..f6ca27df 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -33,7 +33,7 @@ jobs: strategy: matrix: - node-version: [20.x] + runtime: [node, bun] provider: [sqlite, postgresql] steps: @@ -45,12 +45,19 @@ jobs: with: version: 10.12.1 - - name: Use Node.js ${{ matrix.node-version }} + - name: Use Node.js 20.x + if: matrix.runtime == 'node' uses: buildjet/setup-node@v3 with: - node-version: ${{ matrix.node-version }} + node-version: 20.x cache: 'pnpm' + - name: Use Bun 1.x + if: matrix.runtime == 'bun' + uses: oven-sh/setup-bun@v2 + with: + bun-version: 1.2.22 + - name: Get pnpm store directory id: pnpm-cache shell: bash @@ -76,5 +83,10 @@ jobs: - name: Lint run: pnpm run lint - - name: Test + - name: Test Node.js + if: matrix.runtime == 'node' run: TEST_DB_PROVIDER=${{ matrix.provider }} pnpm run test + + - name: Test Bun + if: matrix.runtime == 'bun' + run: TEST_DB_PROVIDER=${{ matrix.provider }} bun run test diff --git a/packages/language/test/utils.ts b/packages/language/test/utils.ts index b14bdabb..60260ad3 100644 --- a/packages/language/test/utils.ts +++ b/packages/language/test/utils.ts @@ -1,5 +1,6 @@ import { invariant } from '@zenstackhq/common-helpers'; import { glob } from 'glob'; +import crypto from 'node:crypto'; import fs from 'node:fs'; import os from 'node:os'; import path from 'node:path';