Skip to content

feat: expose bus api #2673

feat: expose bus api

feat: expose bus api #2673

Workflow file for this run

name: Test
on:
push:
pull_request:
schedule:
- cron: '0 12 */4 * *'
permissions:
contents: read
env:
npm_config_audit: false
npm_config_fund: false
npm_config_save: false
npm_config_package_lock: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- run: npm ci
- run: |
npm run build
cd build && ls -l
- uses: actions/upload-artifact@v4
with:
name: build
path: |
build
jsr.json
package.json
package-lite.json
package-main.json
retention-days: 1
checks:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
fetch-depth: ${{ github.event_name == 'pull_request' && '15' || '1' }} # to ensure we have enough history for commitlint
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- uses: actions/download-artifact@v5
with:
name: build
- run: npm ci
- name: Format
run: npm run fmt:check
- name: License
run: npm run test:license
- name: Size
run: npm run test:size
- name: Dep audit
run: npm run test:audit
- name: Circular
run: npm run test:circular
- name: Bundles
run: npm run test:npm
timeout-minutes: 1
- name: JSR dry-run
run: npm run test:jsr
- name: Conventional Commits
if: github.event_name == 'pull_request'
env:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: npx commitlint --from "$BASE_SHA" --to "$HEAD_SHA" --verbose
test:
needs: build
runs-on: ubuntu-latest
env:
FORCE_COLOR: 3
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- uses: actions/download-artifact@v5
with:
name: build
- run: npm ci
- name: Unit tests
run: npm run test:coverage
timeout-minutes: 1
- name: Type tests
run: npm run test:types
docker-test:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: actions/download-artifact@v5
with:
name: build
- run: |
npm run build:dcr
npm run test:dcr
smoke-win32-node16:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Use Node.js 16.x
uses: actions/setup-node@v4
with:
node-version: 16.x
cache: 'npm'
- uses: actions/download-artifact@v5
with:
name: build
- run: npm run test:smoke:win32
timeout-minutes: 1
env:
FORCE_COLOR: 3
smoke-bun:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup Bun
uses: antongolub/action-setup-bun@f0b9f339a7ce9ba1174a58484e4dc9bbd6f7b133 # v1.13.2
- uses: actions/download-artifact@v5
with:
name: build
- run: |
bun test ./test/smoke/bun.test.js
bun ./test/smoke/ts.test.ts
timeout-minutes: 1
env:
FORCE_COLOR: 3
smoke-deno:
runs-on: ubuntu-latest
needs: build
name: smoke-deno${{ matrix.deno-version }}
strategy:
matrix:
deno-version: [1, 2]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Setup Deno
uses: denoland/setup-deno@909cc5acb0fdd60627fb858598759246509fa755 # v2.0.2
with:
deno-version: ${{ matrix.deno-version }}
- run: deno install npm:types/node npm:types/fs-extra
- uses: actions/download-artifact@v5
with:
name: build
- run: deno test --allow-read --allow-sys --allow-env --allow-run ./test/smoke/deno.test.js
timeout-minutes: 1
env:
FORCE_COLOR: 3
smoke-node:
runs-on: ubuntu-latest
needs: build
name: smoke-node${{ matrix.node-version }}
strategy:
matrix:
node-version: [12, 14, 16, 18, 20, 22, 24, 25-nightly]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- uses: actions/download-artifact@v5
with:
name: build
- name: cjs smoke test
run: npm run test:smoke:cjs
- name: mjs smoke test
run: npm run test:smoke:mjs
- name: strip-types
if: matrix.node-version >= 22
run: npm run test:smoke:strip-types
smoke-graal:
needs: build
runs-on: ubuntu-latest
name: smoke-graal${{ matrix.version }}
strategy:
matrix:
version: [17, 20]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- uses: graalvm/setup-graalvm@7f61f4917e70cddcfee9df637f280f10d5ae3566 #v1
with:
java-version: ${{ matrix.version }}
distribution: 'graalvm-community'
components: 'nodejs'
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/download-artifact@v5
with:
name: build
- name: smoke tests
run: |
which node
node -v
npm run test:smoke:cjs
smoke-ts:
runs-on: ubuntu-latest
needs: build
name: smoke-ts${{ matrix.ts }}
strategy:
matrix:
ts: [4, 5, rc, next]
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 24
cache: 'npm'
- name: Install deps
run: npm ci
- name: Install TypeScript ${{ matrix.ts }}
run: npm i --force typescript@${{ matrix.ts }}
- name: Override @types/node
if: matrix.ts == 4
run: npm i --force @types/[email protected]
- uses: actions/download-artifact@v5
with:
name: build
- name: tsc
run: npm run test:smoke:tsc
- name: tsx
run: npm run test:smoke:tsx
- name: ts-node
run: npm run test:smoke:ts-node