Skip to content

Commit 2420b1f

Browse files
committed
Update bun CI.
1 parent f93f8e7 commit 2420b1f

File tree

5 files changed

+41
-43
lines changed

5 files changed

+41
-43
lines changed

.github/workflows/ci_bun.yml

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,37 @@ jobs:
3030
bun-version: ${{ matrix.bun-version }}
3131
- name: Install esbuild
3232
run: npm install -g esbuild
33-
- name: Prepare test for hpke-js
34-
working-directory: ./
35-
run: |
36-
pwd
37-
deno run -A dnt.ts 0.0.0
38-
deno task minify > test/runtimes/hpke.js
39-
- name: Run npm pack for hpke-js
40-
working-directory: ./npm
41-
run: npm pack
4233
- name: Prepare test for core
43-
working-directory: ./core
34+
working-directory: ./x/core
4435
run: |
4536
deno run -A dnt.ts 0.0.0
46-
deno task minify > ../x/dhkem-x25519/test/runtimes/hpke-core.js
47-
deno task minify > ../x/dhkem-x448/test/runtimes/hpke-core.js
48-
deno task minify > ../x/hybridkem-x25519-kyber768/test/runtimes/hpke-core.js
49-
deno task minify > ../x/dhkem-secp256k1/test/runtimes/hpke-core.js
50-
- name: Run npm pack for core
51-
working-directory: ./core/npm
37+
deno task minify > ../dhkem-x25519/test/runtimes/hpke-core.js
38+
deno task minify > ../dhkem-x448/test/runtimes/hpke-core.js
39+
deno task minify > ../hybridkem-x25519-kyber768/test/runtimes/hpke-core.js
40+
deno task minify > ../dhkem-secp256k1/test/runtimes/hpke-core.js
41+
- name: Run npm pack for ./x/core
42+
working-directory: ./npm-packages/x/core
5243
run: npm pack
53-
- name: Run test for core
54-
working-directory: ./core/test/runtimes/bun
44+
- name: Run test for ./x/core
45+
working-directory: ./x/core/test/runtimes/bun
5546
run: |
5647
bun install
5748
nohup bun src/index.ts &
5849
sleep 3
5950
deno test core.spec.ts --allow-net --config ../../../deno.json
60-
- name: Run test for hpke-js
61-
working-directory: ./test/runtimes/bun
51+
- working-directory: ./x/chacha20poly1305
52+
run: |
53+
deno run -A dnt.ts 0.0.0
54+
- name: Run npm pack for ./x/chacha20poly1305
55+
working-directory: ./npm-packages/x/chacha20poly1305
56+
run: npm pack
57+
- name: Run test for ./x/chacha20poly1305
58+
working-directory: ./x/chacha20poly1305/test/runtimes/bun
6259
run: |
6360
bun install
64-
nohup bun run src/index.ts &
61+
nohup bun src/index.ts &
6562
sleep 3
66-
deno test hpke.spec.ts --allow-net --config ../../../deno.json
63+
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
6764
- working-directory: ./x/dhkem-x25519
6865
run: |
6966
deno task dnt
@@ -84,20 +81,6 @@ jobs:
8481
nohup bun src/index.js &
8582
sleep 3
8683
deno test dhkem-x448.spec.ts --allow-net
87-
- working-directory: ./x/chacha20poly1305
88-
run: |
89-
deno task dnt
90-
deno run -A dnt.ts 0.0.0
91-
- name: Run npm pack for chacha20poly1305
92-
working-directory: ./x/chacha20poly1305/npm
93-
run: npm pack
94-
- name: Run test for chacha20poly1305
95-
working-directory: ./x/chacha20poly1305/test/runtimes/bun
96-
run: |
97-
bun install
98-
nohup bun src/index.ts &
99-
sleep 3
100-
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
10184
- working-directory: ./x/hybridkem-x25519-kyber768
10285
run: |
10386
deno task dnt
@@ -117,4 +100,19 @@ jobs:
117100
run: |
118101
nohup bun src/index.js &
119102
sleep 3
120-
deno test dhkem-secp256k1.spec.ts --allow-net
103+
deno test dhkem-secp256k1.spec.ts --allow-net
104+
- name: Prepare test for hpke-js
105+
working-directory: ./x/hpke-js
106+
run: |
107+
deno run -A dnt.ts 0.0.0
108+
deno task minify > test/runtimes/hpke.js
109+
- name: Run npm pack for hpke-js
110+
working-directory: ./npm-packages/x/hpke-js
111+
run: npm pack
112+
- name: Run test for hpke-js
113+
working-directory: ./test/runtimes/bun
114+
run: |
115+
bun install
116+
nohup bun run src/index.ts &
117+
sleep 3
118+
deno test hpke.spec.ts --allow-net --config ../../../deno.json

x/chacha20poly1305/test/runtimes/bun/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"typescript": "^5.0.0"
1010
},
1111
"dependencies": {
12-
"@hpke/chacha20poly1305": "file:../../../npm/hpke-chacha20poly1305-0.0.0.tgz",
13-
"@hpke/core": "file:../../../../../core/npm/hpke-core-0.0.0.tgz"
12+
"@hpke/chacha20poly1305": "file:../../../../../npm-packages/x/chacha20poly1305/hpke-chacha20poly1305-0.0.0.tgz",
13+
"@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz"
1414
}
1515
}

x/core/test/runtimes/bun/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
"typescript": "^5.0.0"
1010
},
1111
"dependencies": {
12-
"@hpke/core": "file:../../../npm/hpke-core-0.0.0.tgz"
12+
"@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz"
1313
}
1414
}

x/hpke-js/test/runtimes/bun/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"typescript": "^5.0.0"
1010
},
1111
"dependencies": {
12-
"@dajiaji/hpke": "file:../../../npm/hpke-js-0.0.0.tgz",
13-
"@hpke/core": "file:../../../core/npm/hpke-core-0.0.0.tgz"
12+
"@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-0.0.0.tgz",
13+
"@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz"
1414
}
1515
}

x/hpke-js/test/runtimes/bun/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { CipherSuite } from "@dajiaji/hpke";
1+
import { CipherSuite } from "@hpke/hpke-js";
22

33
export async function testServer(request: Request): Promise<Response> {
44
const url = new URL(request.url);

0 commit comments

Comments
 (0)