Skip to content

Commit 2862b1a

Browse files
committed
Update bun CI.
1 parent f93f8e7 commit 2862b1a

File tree

10 files changed

+65
-62
lines changed

10 files changed

+65
-62
lines changed

.github/workflows/ci_bun.yml

Lines changed: 49 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,91 +30,94 @@ 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: ./
33+
- name: Prepare test for ./x/core
34+
working-directory: ./x/core
3535
run: |
36-
pwd
3736
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
44-
run: |
45-
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+
- name: Prepare test for ./x/chacha20poly1305
52+
working-directory: ./x/chacha20poly1305
53+
run: |
54+
deno run -A dnt.ts 0.0.0
55+
- name: Run npm pack for ./x/chacha20poly1305
56+
working-directory: ./npm-packages/x/chacha20poly1305
57+
run: npm pack
58+
- name: Run test for ./x/chacha20poly1305
59+
working-directory: ./x/chacha20poly1305/test/runtimes/bun
6260
run: |
6361
bun install
64-
nohup bun run src/index.ts &
62+
nohup bun src/index.ts &
6563
sleep 3
66-
deno test hpke.spec.ts --allow-net --config ../../../deno.json
67-
- working-directory: ./x/dhkem-x25519
64+
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
65+
- name: Prepare test for ./x/dhkem-x25519
66+
working-directory: ./x/dhkem-x25519
6867
run: |
6968
deno task dnt
7069
deno task minify > test/runtimes/hpke-dhkem-x25519.js
71-
- name: Run test for dhkem-x25519
70+
- name: Run test for ./x/dhkem-x25519
7271
working-directory: ./x/dhkem-x25519/test/runtimes/bun
7372
run: |
7473
nohup bun src/index.js &
7574
sleep 3
7675
deno test dhkem-x25519.spec.ts --allow-net
77-
- working-directory: ./x/dhkem-x448
76+
- name: Prepare test for ./x/dhkem-x448
77+
working-directory: ./x/dhkem-x448
7878
run: |
7979
deno task dnt
8080
deno task minify > test/runtimes/hpke-dhkem-x448.js
81-
- name: Run test for dhkem-x448
81+
- name: Run test for ./x/dhkem-x448
8282
working-directory: ./x/dhkem-x448/test/runtimes/bun
8383
run: |
8484
nohup bun src/index.js &
8585
sleep 3
8686
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
101-
- working-directory: ./x/hybridkem-x25519-kyber768
87+
- name: Prepare test for ./x/hybridkem-x25519-kyber768
88+
working-directory: ./x/hybridkem-x25519-kyber768
10289
run: |
10390
deno task dnt
10491
deno task minify > test/runtimes/hpke-hybridkem-x25519-kyber768.js
105-
- name: Run test for hybridkem-x25519-kyber768
92+
- name: Run test for ./x/hybridkem-x25519-kyber768
10693
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/bun
10794
run: |
10895
nohup bun src/index.js &
10996
sleep 3
11097
deno test hybridkem-x25519-kyber768.spec.ts --allow-net
111-
- working-directory: ./x/dhkem-secp256k1/
98+
- name: Prepare test for ./x/dhkem-secp256k1
99+
working-directory: ./x/dhkem-secp256k1
112100
run: |
113101
deno task dnt
114102
deno task minify > test/runtimes/hpke-dhkem-secp256k1.js
115-
- name: Run test for dhkem-secp256k1
103+
- name: Run test for ./x/dhkem-secp256k1
116104
working-directory: ./x/dhkem-secp256k1/test/runtimes/bun
117105
run: |
118106
nohup bun src/index.js &
119107
sleep 3
120-
deno test dhkem-secp256k1.spec.ts --allow-net
108+
deno test dhkem-secp256k1.spec.ts --allow-net
109+
- name: Prepare test for ./x/hpke-js
110+
working-directory: ./x/hpke-js
111+
run: |
112+
deno run -A dnt.ts 0.0.0
113+
deno task minify > test/runtimes/hpke.js
114+
- name: Run npm pack for ./x/hpke-js
115+
working-directory: ./npm-packages/x/hpke-js
116+
run: npm pack
117+
- name: Run test for ./x/hpke-js
118+
working-directory: ./x/hpke-js/test/runtimes/bun
119+
run: |
120+
bun install
121+
nohup bun run src/index.ts &
122+
sleep 3
123+
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)