Skip to content

Commit 54a9679

Browse files
committed
Update bun CI.
1 parent f93f8e7 commit 54a9679

File tree

10 files changed

+47
-48
lines changed

10 files changed

+47
-48
lines changed

.github/workflows/ci_bun.yml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,24 @@ 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
42-
- name: Prepare test for core
43-
working-directory: ./core
33+
- name: Prepare test for ./x/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
62-
run: |
63-
bun install
64-
nohup bun run src/index.ts &
65-
sleep 3
66-
deno test hpke.spec.ts --allow-net --config ../../../deno.json
6751
- working-directory: ./x/dhkem-x25519
6852
run: |
6953
deno task dnt
@@ -84,14 +68,14 @@ jobs:
8468
nohup bun src/index.js &
8569
sleep 3
8670
deno test dhkem-x448.spec.ts --allow-net
87-
- working-directory: ./x/chacha20poly1305
71+
- name: Prepare test for ./x/chacha20poly1305
72+
working-directory: ./x/chacha20poly1305
8873
run: |
89-
deno task dnt
9074
deno run -A dnt.ts 0.0.0
91-
- name: Run npm pack for chacha20poly1305
92-
working-directory: ./x/chacha20poly1305/npm
75+
- name: Run npm pack for ./x/chacha20poly1305
76+
working-directory: ./npm-packages/x/chacha20poly1305
9377
run: npm pack
94-
- name: Run test for chacha20poly1305
78+
- name: Run test for ./x/chacha20poly1305
9579
working-directory: ./x/chacha20poly1305/test/runtimes/bun
9680
run: |
9781
bun install
@@ -117,4 +101,19 @@ jobs:
117101
run: |
118102
nohup bun src/index.js &
119103
sleep 3
120-
deno test dhkem-secp256k1.spec.ts --allow-net
104+
deno test dhkem-secp256k1.spec.ts --allow-net
105+
- name: Prepare test for hpke-js
106+
working-directory: ./x/hpke-js
107+
run: |
108+
deno run -A dnt.ts 0.0.0
109+
deno task minify > test/runtimes/hpke.js
110+
- name: Run npm pack for hpke-js
111+
working-directory: ./npm-packages/x/hpke-js
112+
run: npm pack
113+
- name: Run test for hpke-js
114+
working-directory: ./x/hpke-js/test/runtimes/bun
115+
run: |
116+
bun install
117+
nohup bun run src/index.ts &
118+
sleep 3
119+
deno test hpke.spec.ts --allow-net --config ../../../deno.json

x/chacha20poly1305/dnt.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@ await build({
2828
homepage:
2929
"https://github.com/dajiaji/hpke-js/tree/main/x/chacha20poly1305#readme",
3030
license: "MIT",
31-
module: "./esm/x/chacha20poly1305/mod.js",
32-
main: "./script/x/chacha20poly1305/mod.js",
33-
types: "./esm/x/chacha20poly1305/mod.d.ts",
31+
module: "./esm/chacha20poly1305/mod.js",
32+
main: "./script/chacha20poly1305/mod.js",
33+
types: "./esm/chacha20poly1305/mod.d.ts",
3434
sideEffects: false,
3535
exports: {
3636
".": {
37-
"import": "./esm/x/chacha20poly1305/mod.js",
38-
"require": "./script/x/chacha20poly1305/mod.js",
37+
"import": "./esm/chacha20poly1305/mod.js",
38+
"require": "./script/chacha20poly1305/mod.js",
3939
},
4040
"./package.json": "./package.json",
4141
},
90 Bytes
Binary file not shown.

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/bun.lockb

44 Bytes
Binary file not shown.

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/dnt.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ await build({
2727
},
2828
homepage: "https://github.com/dajiaji/hpke-js#readme",
2929
license: "MIT",
30-
module: "./esm/x/hpke-js/mod.js",
31-
main: "./script/x/hpke-js/mod.js",
32-
types: "./esm/x/hpke-js/mod.d.ts",
30+
module: "./esm/hpke-js/mod.js",
31+
main: "./script/hpke-js/mod.js",
32+
types: "./esm/hpke-js/mod.d.ts",
3333
sideEffects: false,
3434
exports: {
3535
".": {
36-
"import": "./esm/x/hpke-js/mod.js",
37-
"require": "./script/x/hpke-js/mod.js",
36+
"import": "./esm/hpke-js/mod.js",
37+
"require": "./script/hpke-js/mod.js",
3838
},
3939
"./package.json": "./package.json",
4040
},
84 Bytes
Binary file not shown.

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)