Skip to content

Commit a8e93d3

Browse files
committed
Install and test client using Bun
1 parent 9c0711e commit a8e93d3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/main.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ jobs:
4646
- type: node
4747
version: 18.x
4848
- type: node
49+
version: 20.x
50+
- type: bun
4951
runs-on: ubuntu-latest
5052
timeout-minutes: 3
5153
steps:
@@ -66,6 +68,9 @@ jobs:
6668
uses: actions/setup-node@v3
6769
with:
6870
node-version: ${{ matrix.environment.version }}
71+
- name: Use Bun ${{ matrix.environment.version }}
72+
if: matrix.environment.type == 'bun'
73+
uses: oven-sh/setup-bun@v1
6974
- name: Install dependencies
7075
if: matrix.environment.type == 'node'
7176
run: npm ci
@@ -102,6 +107,15 @@ jobs:
102107
gen_code ./dist/src/index.js > test.mjs
103108
node test.mjs | tee /dev/stderr | grep -q true
104109
;;
110+
bun)
111+
# Workaround: https://github.com/oven-sh/bun/issues/1590
112+
dependencies=`jq -r '.dependencies|to_entries|map("\(.key)@\(.value)")|join(" ")' package.json`
113+
( set -x; mkdir ~/tmp-bun && cd "$_" && ls -lah && bun install -p "$dependencies" && rm -rf `pwd`; )
114+
bun install -p --ignore-scripts
115+
bun build src/index.ts --target bun > ts-postgres.js
116+
gen_code ./ts-postgres.js > test.mjs
117+
bun test.mjs | tee /dev/stderr | grep -q true
118+
;;
105119
esac
106120
env:
107121
ENVIRONMENT: ${{ matrix.environment.type }}

0 commit comments

Comments
 (0)