Skip to content

Commit b99aea9

Browse files
committed
Update cloudflare CI.
1 parent 2862b1a commit b99aea9

File tree

3 files changed

+47
-41
lines changed

3 files changed

+47
-41
lines changed

.github/workflows/ci_cloudflare.yml

Lines changed: 45 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,89 +22,95 @@ jobs:
2222
node-version: v20.x
2323
- name: Install esbuild
2424
run: npm install -g esbuild
25-
- name: Run dnt
26-
run: deno run -A dnt.ts 0.0.0
27-
- name: Run npm pack
28-
working-directory: ./npm
25+
- name: Prepare test for ./x/core
26+
working-directory: ./x/core
27+
run: |
28+
deno run -A dnt.ts 0.0.0
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
34+
- name: Run npm pack for ./x/core
35+
working-directory: ./npm-packages/x/core
2936
run: npm pack
30-
- name: Run test
31-
working-directory: ./test/runtimes/cloudflare
37+
- name: Run test for ./x/core
38+
working-directory: ./x/core/test/runtimes/cloudflare
3239
run: |
3340
npm install
3441
nohup npm start &
3542
sleep 3
36-
deno test hpke.spec.ts --allow-net --config ../../../deno.json
37-
- working-directory: ./core
43+
deno test core.spec.ts --allow-net --config ../../../deno.json
44+
- name: Prepare test for ./x/chacha20poly1305
45+
working-directory: ./x/chacha20poly1305
3846
run: |
3947
deno task dnt
40-
deno run -A dnt.ts 0.0.0
41-
deno task minify > ../x/dhkem-x25519/test/runtimes/hpke-core.js
42-
deno task minify > ../x/dhkem-x448/test/runtimes/hpke-core.js
43-
deno task minify > ../x/chacha20poly1305/test/runtimes/hpke-core.js
44-
deno task minify > ../x/hybridkem-x25519-kyber768/test/runtimes/hpke-core.js
45-
deno task minify > ../x/dhkem-secp256k1/test/runtimes/hpke-core.js
46-
- name: Run npm pack for core
47-
working-directory: ./core/npm
48-
run: npm pack
49-
- name: Run test for core
50-
working-directory: ./core/test/runtimes/cloudflare
48+
deno task minify > test/runtimes/hpke-chacha20poly1305.js
49+
- name: Run test for chacha20poly1305
50+
working-directory: ./x/chacha20poly1305/test/runtimes/cloudflare
5151
run: |
5252
npm install
5353
nohup npm start &
5454
sleep 3
55-
deno test core.spec.ts --allow-net --config ../../../deno.json
56-
- working-directory: ./x/dhkem-x25519
55+
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
56+
- name: Prepare test for ./x/dhkem-x25519
57+
working-directory: ./x/dhkem-x25519
5758
run: |
5859
deno task dnt
5960
deno task minify > test/runtimes/hpke-dhkem-x25519.js
60-
- name: Run test for dhkem-x25519
61+
- name: Run test for ./x/dhkem-x25519
6162
working-directory: ./x/dhkem-x25519/test/runtimes/cloudflare
6263
run: |
6364
npm install
6465
nohup npm start &
6566
sleep 3
6667
deno test dhkem-x25519.spec.ts --allow-net --config ../../../deno.json
67-
- working-directory: ./x/dhkem-x448
68+
- name: Prepare test for ./x/dhkem-x448
69+
working-directory: ./x/dhkem-x448
6870
run: |
6971
deno task dnt
7072
deno task minify > test/runtimes/hpke-dhkem-x448.js
71-
- name: Run test for dhkem-x448
73+
- name: Run test for ./x/dhkem-x448
7274
working-directory: ./x/dhkem-x448/test/runtimes/cloudflare
7375
run: |
7476
npm install
7577
nohup npm start &
7678
sleep 3
7779
deno test dhkem-x448.spec.ts --allow-net --config ../../../deno.json
78-
- working-directory: ./x/chacha20poly1305
79-
run: |
80-
deno task dnt
81-
deno task minify > test/runtimes/hpke-chacha20poly1305.js
82-
- name: Run test for chacha20poly1305
83-
working-directory: ./x/chacha20poly1305/test/runtimes/cloudflare
84-
run: |
85-
npm install
86-
nohup npm start &
87-
sleep 3
88-
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json
89-
- working-directory: ./x/hybridkem-x25519-kyber768
80+
- name: Prepare test for ./x/hybridkem-x25519-kyber768
81+
working-directory: ./x/hybridkem-x25519-kyber768
9082
run: |
9183
deno task dnt
9284
deno task minify > test/runtimes/hpke-hybridkem-x25519-kyber768.js
93-
- name: Run test for hybridkem-x25519-kyber768
85+
- name: Run test for ./x/hybridkem-x25519-kyber768
9486
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/cloudflare
9587
run: |
9688
npm install
9789
nohup npm start &
9890
sleep 3
9991
deno test hybridkem-x25519-kyber768.spec.ts --allow-net --config ../../../deno.json
100-
- working-directory: ./x/dhkem-secp256k1
92+
- name: Prepare test for ./x/dhkem-secp256k1
93+
working-directory: ./x/dhkem-secp256k1
10194
run: |
10295
deno task dnt
10396
deno task minify > test/runtimes/hpke-dhkem-secp256k1.js
104-
- name: Run test for dhkem-secp256k1
97+
- name: Run test for ./x/dhkem-secp256k1
10598
working-directory: ./x/dhkem-secp256k1/test/runtimes/cloudflare
10699
run: |
107100
npm install
108101
nohup npm start &
109102
sleep 3
110103
deno test dhkem-secp256k1.spec.ts --allow-net --config ../../../deno.json
104+
- name: Prepare test for hpke-js
105+
working-directory: ./x/hpke-js
106+
run: deno run -A dnt.ts 0.0.0
107+
- name: Run npm pack for ./x/hpke-js
108+
working-directory: ./npm-packages/x/hpke-js
109+
run: npm pack
110+
- name: Run test for ./x/hpke-js
111+
working-directory: ./x/hpke-js/test/runtimes/cloudflare
112+
run: |
113+
npm install
114+
nohup npm start &
115+
sleep 3
116+
deno test hpke.spec.ts --allow-net --config ../../../deno.json

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"deploy": "wrangler publish"
1111
},
1212
"dependencies": {
13-
"@hpke/core": "file:../../../npm/hpke-core-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/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
"deploy": "wrangler publish"
1111
},
1212
"dependencies": {
13-
"@dajiaji/hpke": "file:../../../npm/hpke-js-0.0.0.tgz"
13+
"@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-0.0.0.tgz"
1414
}
1515
}

0 commit comments

Comments
 (0)