Skip to content
This repository was archived by the owner on Jul 17, 2025. It is now read-only.

Commit 3c2025b

Browse files
committed
CI: test with Bun (based on JavaScriptCore engine)
1 parent 3b9ece0 commit 3c2025b

File tree

2 files changed

+55
-7
lines changed

2 files changed

+55
-7
lines changed

.github/workflows/nodejs-ci.yml renamed to .github/workflows/ci.yml

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Node.js CI
1+
name: CI
22

33
on:
44
pull_request:
@@ -45,7 +45,8 @@ jobs:
4545
test/**/*.js
4646
test/**/*.js.map
4747
48-
test:
48+
test-nodejs:
49+
name: "Node.js"
4950
runs-on: ubuntu-latest
5051
needs: build
5152

@@ -61,7 +62,7 @@ jobs:
6162
- name: 'Checkout the repository'
6263
uses: actions/checkout@v4
6364

64-
- name: Test with Node.js ${{ matrix.node-version }}
65+
- name: Setup Node.js ${{ matrix.node-version }}
6566
uses: actions/setup-node@v4
6667
with:
6768
node-version: ${{ matrix.node-version }}
@@ -77,18 +78,65 @@ jobs:
7778
with:
7879
name: build
7980

80-
- name: Test with Node.js ${{ matrix.node-version }}
81+
- name: Unit tests with Node.js ${{ matrix.node-version }}
8182
run: yarn run test-coverage
8283

8384
- name: Coveralls Parallel
8485
uses: coverallsapp/github-action@v2
8586
with:
8687
github-token: ${{ secrets.github_token }}
87-
flag-name: run-${{ matrix.test_number }}
88+
flag-name: run-nodejs-${{ matrix.test_number }}
89+
parallel: true
90+
91+
92+
93+
test-bun:
94+
name: "Bun (JavaScriptCore)"
95+
runs-on: ubuntu-latest
96+
needs: build
97+
98+
strategy:
99+
matrix:
100+
bun-version: [1.2]
101+
102+
env:
103+
YARN_IGNORE_NODE: 1
104+
105+
steps:
106+
107+
- name: 'Checkout the repository'
108+
uses: actions/checkout@v4
109+
110+
- name: Setup Bun ${{ matrix.bun-version }}
111+
uses: oven-sh/setup-bun@v2
112+
with:
113+
bun-version: ${{ matrix.bun-version }}
114+
115+
- name: Enable Corepack
116+
run: corepack enable
117+
118+
- name: Install dependencies
119+
run: yarn install
120+
121+
- name: Download build
122+
uses: actions/download-artifact@v4
123+
with:
124+
name: build
125+
126+
- name: Unit tests with Bun ${{ matrix.bun-version }}
127+
run: yarn run test-coverage
128+
129+
- name: Coveralls Parallel
130+
uses: coverallsapp/github-action@v2
131+
with:
132+
github-token: ${{ secrets.github_token }}
133+
flag-name: run-bun-${{ matrix.test_number }}
88134
parallel: true
89135

90136
finish:
91-
needs: test
137+
needs:
138+
- test-nodejs
139+
- test-bun
92140
runs-on: ubuntu-latest
93141
steps:
94142
- name: Coveralls Finished

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ The `peek-readable` contains one class: `StreamReader`, which reads from a [stre
2222

2323
Module: version 5 migrated from [CommonJS](https://en.wikipedia.org/wiki/CommonJS) to [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
2424
JavaScript is compliant with [ECMAScript 2019 (ES10)](https://en.wikipedia.org/wiki/ECMAScript#10th_Edition_%E2%80%93_ECMAScript_2019).
25-
Requires a modern browser or Node.js ≥ 18 engine.
25+
Requires a modern browser or Node.js ≥ 18 engine or Bun ≥ 1.2.
2626

2727
For TypeScript CommonJs backward compatibility, you can use [load-esm](https://github.com/Borewit/load-esm).
2828

0 commit comments

Comments
 (0)