Skip to content

Commit a9629f4

Browse files
committed
Update bun CI.
1 parent f93f8e7 commit a9629f4

File tree

7 files changed

+43
-44
lines changed

7 files changed

+43
-44
lines changed

.github/workflows/ci_bun.yml

Lines changed: 37 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,40 +30,38 @@ 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
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
64+
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
6765
- working-directory: ./x/dhkem-x25519
6866
run: |
6967
deno task dnt
@@ -84,20 +82,6 @@ jobs:
8482
nohup bun src/index.js &
8583
sleep 3
8684
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
10185
- working-directory: ./x/hybridkem-x25519-kyber768
10286
run: |
10387
deno task dnt
@@ -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: ./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
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/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)