Skip to content

Commit c079eea

Browse files
authored
Merge pull request #354 from dajiaji/refine-cloudflare-test
Refine chacha20poly1305 test for cloudflare workers.
2 parents 7c1fce6 + 3581349 commit c079eea

File tree

31 files changed

+101
-7423
lines changed

31 files changed

+101
-7423
lines changed

.github/workflows/ci_cloudflare.yml

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,7 @@ jobs:
2424
run: npm install -g esbuild
2525
- name: Prepare test for ./x/core
2626
working-directory: ./x/core
27-
run: |
28-
deno run -A dnt.ts
29-
deno task minify > ../chacha20poly1305/test/runtimes/hpke-core.js
30-
deno task minify > ../dhkem-x25519/test/runtimes/hpke-core.js
31-
deno task minify > ../dhkem-x448/test/runtimes/hpke-core.js
32-
deno task minify > ../hybridkem-x25519-kyber768/test/runtimes/hpke-core.js
33-
deno task minify > ../dhkem-secp256k1/test/runtimes/hpke-core.js
27+
run: deno task dnt
3428
- name: Run npm pack for ./x/core
3529
working-directory: ./npm-packages/x/core
3630
run: npm pack
@@ -43,10 +37,11 @@ jobs:
4337
deno test core.spec.ts --allow-net --config ../../../deno.json
4438
- name: Prepare test for ./x/chacha20poly1305
4539
working-directory: ./x/chacha20poly1305
46-
run: |
47-
deno task dnt
48-
deno task minify > test/runtimes/hpke-chacha20poly1305.js
49-
- name: Run test for chacha20poly1305
40+
run: deno task dnt
41+
- name: Run npm pack for ./x/chacha20poly1305
42+
working-directory: ./npm-packages/x/chacha20poly1305
43+
run: npm pack
44+
- name: Run test for ./x/chacha20poly1305
5045
working-directory: ./x/chacha20poly1305/test/runtimes/cloudflare
5146
run: |
5247
npm install
@@ -55,9 +50,10 @@ jobs:
5550
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
5651
- name: Prepare test for ./x/dhkem-x25519
5752
working-directory: ./x/dhkem-x25519
58-
run: |
59-
deno task dnt
60-
deno task minify > test/runtimes/hpke-dhkem-x25519.js
53+
run: deno task dnt
54+
- name: Run npm pack for ./x/dhkem-x25519
55+
working-directory: ./npm-packages/x/dhkem-x25519
56+
run: npm pack
6157
- name: Run test for ./x/dhkem-x25519
6258
working-directory: ./x/dhkem-x25519/test/runtimes/cloudflare
6359
run: |
@@ -67,40 +63,43 @@ jobs:
6763
deno test dhkem-x25519.spec.ts --allow-net --config ../../../deno.json
6864
- name: Prepare test for ./x/dhkem-x448
6965
working-directory: ./x/dhkem-x448
70-
run: |
71-
deno task dnt
72-
deno task minify > test/runtimes/hpke-dhkem-x448.js
66+
run: deno task dnt
67+
- name: Run npm pack for ./x/dhkem-x448
68+
working-directory: ./npm-packages/x/dhkem-x448
69+
run: npm pack
7370
- name: Run test for ./x/dhkem-x448
7471
working-directory: ./x/dhkem-x448/test/runtimes/cloudflare
7572
run: |
7673
npm install
7774
nohup npm start &
7875
sleep 3
7976
deno test dhkem-x448.spec.ts --allow-net --config ../../../deno.json
80-
- name: Prepare test for ./x/hybridkem-x25519-kyber768
81-
working-directory: ./x/hybridkem-x25519-kyber768
82-
run: |
83-
deno task dnt
84-
deno task minify > test/runtimes/hpke-hybridkem-x25519-kyber768.js
85-
- name: Run test for ./x/hybridkem-x25519-kyber768
86-
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/cloudflare
87-
run: |
88-
npm install
89-
nohup npm start &
90-
sleep 3
91-
deno test hybridkem-x25519-kyber768.spec.ts --allow-net --config ../../../deno.json
9277
- name: Prepare test for ./x/dhkem-secp256k1
9378
working-directory: ./x/dhkem-secp256k1
94-
run: |
95-
deno task dnt
96-
deno task minify > test/runtimes/hpke-dhkem-secp256k1.js
79+
run: deno task dnt
80+
- name: Run npm pack for ./x/dhkem-secp256k1
81+
working-directory: ./npm-packages/x/dhkem-secp256k1
82+
run: npm pack
9783
- name: Run test for ./x/dhkem-secp256k1
9884
working-directory: ./x/dhkem-secp256k1/test/runtimes/cloudflare
9985
run: |
10086
npm install
10187
nohup npm start &
10288
sleep 3
10389
deno test dhkem-secp256k1.spec.ts --allow-net --config ../../../deno.json
90+
- name: Prepare test for ./x/hybridkem-x25519-kyber768
91+
working-directory: ./x/hybridkem-x25519-kyber768
92+
run: deno task dnt
93+
- name: Run npm pack for ./x/hybridkem-x25519-kyber768
94+
working-directory: ./npm-packages/x/hybridkem-x25519-kyber768
95+
run: npm pack
96+
- name: Run test for ./x/hybridkem-x25519-kyber768
97+
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/cloudflare
98+
run: |
99+
npm install
100+
nohup npm start &
101+
sleep 3
102+
deno test hybridkem-x25519-kyber768.spec.ts --allow-net --config ../../../deno.json
104103
- name: Prepare test for hpke-js
105104
working-directory: ./x/hpke-js
106105
run: deno run -A dnt.ts

0 commit comments

Comments
 (0)