Skip to content

Commit b06671d

Browse files
committed
Update browser CI.
1 parent a57fb83 commit b06671d

File tree

3 files changed

+53
-43
lines changed

3 files changed

+53
-43
lines changed

.github/workflows/ci_browser.yml

Lines changed: 45 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,60 +20,70 @@ jobs:
2020
- uses: actions/setup-node@v4
2121
with:
2222
node-version: v18.x
23-
- run: |
23+
- name: Install dependencies
24+
run: |
2425
npm install -g typescript
2526
npm install -g typedoc
26-
npx typedoc --name "hpke-js $(git describe --tags --abbrev=0)" --out test/runtimes/browsers/pages/docs mod.ts
2727
npm install -g esbuild
28+
- name: Build docs for @hpke/hpke-js
29+
working-directory: ./x/hpke-js
30+
run: |
31+
npx typedoc --name "@hpke/hpke-js $(git describe --tags --abbrev=0)" --out test/runtimes/browsers/pages/docs mod.ts
2832
deno task dnt
2933
deno task minify > test/runtimes/browsers/pages/src/hpke.js
3034
mkdir test/runtimes/browsers/pages/core
31-
cp -rf core/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/core
35+
cp -rf ../core/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/core
36+
mkdir test/runtimes/browsers/pages/chacha20poly1305
37+
cp -rf ../chacha20poly1305/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/chacha20poly1305
3238
mkdir test/runtimes/browsers/pages/dhkem-x25519
33-
cp -rf x/dhkem-x25519/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x25519
39+
cp -rf ../dhkem-x25519/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x25519
3440
mkdir test/runtimes/browsers/pages/dhkem-x448
35-
cp -rf x/dhkem-x448/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x448
36-
mkdir test/runtimes/browsers/pages/chacha20poly1305
37-
cp -rf x/chacha20poly1305/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/chacha20poly1305
41+
cp -rf ../dhkem-x448/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x448
3842
mkdir test/runtimes/browsers/pages/hybridkem-x25519-kyber768
39-
cp -rf x/hybridkem-x25519-kyber768/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x25519-kyber768
43+
cp -rf ../hybridkem-x25519-kyber768/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x25519-kyber768
4044
mkdir test/runtimes/browsers/pages/dhkem-secp256k1
41-
cp -rf x/dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
42-
- working-directory: ./core
45+
cp -rf ../dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
46+
- name: Build docs for @hpke/core
47+
working-directory: ./x/core
4348
run: |
44-
npx typedoc --name "@hpke/core $(git describe --tags --abbrev=0)" --out ../test/runtimes/browsers/pages/core/docs mod.ts
49+
npx typedoc --name "@hpke/core $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/core/docs mod.ts
4550
deno task dnt
46-
deno task minify > ../test/runtimes/browsers/pages/core/src/hpke-core.js
47-
deno task minify > ../test/runtimes/browsers/pages/dhkem-x25519/src/hpke-core.js
48-
deno task minify > ../test/runtimes/browsers/pages/dhkem-x448/src/hpke-core.js
49-
deno task minify > ../test/runtimes/browsers/pages/chacha20poly1305/src/hpke-core.js
50-
deno task minify > ../test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-core.js
51-
deno task minify > ../test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-core.js
52-
- working-directory: ./x/dhkem-x25519
51+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/core/src/hpke-core.js
52+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/src/hpke-core.js
53+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-core.js
54+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-core.js
55+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-core.js
56+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-core.js
57+
- name: Build docs for @hpke/chacha20poly1305
58+
working-directory: ./x/chacha20poly1305
5359
run: |
54-
npx typedoc --name "@hpke/dhkem-x25519 $(git describe --tags --abbrev=0)" --out ../../test/runtimes/browsers/pages/dhkem-x25519/docs mod.ts
60+
npx typedoc --name "@hpke/chacha20poly1305 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/docs mod.ts
5561
deno task dnt
56-
deno task minify > ../../test/runtimes/browsers/pages/dhkem-x25519/src/hpke-dhkem-x25519.js
57-
- working-directory: ./x/dhkem-x448
62+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-chacha20poly1305.js
63+
- name: Build docs for @hpke/dhkem-x25519
64+
working-directory: ./x/dhkem-x25519
5865
run: |
59-
npx typedoc --name "@hpke/dhkem-x448 $(git describe --tags --abbrev=0)" --out ../../test/runtimes/browsers/pages/dhkem-x448/docs mod.ts
66+
npx typedoc --name "@hpke/dhkem-x25519 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/docs mod.ts
6067
deno task dnt
61-
deno task minify > ../../test/runtimes/browsers/pages/dhkem-x448/src/hpke-dhkem-x448.js
62-
- working-directory: ./x/chacha20poly1305
68+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/src/hpke-dhkem-x25519.js
69+
- name: Build docs for @hpke/dhkem-x448
70+
working-directory: ./x/dhkem-x448
6371
run: |
64-
npx typedoc --name "@hpke/chacha20poly1305 $(git describe --tags --abbrev=0)" --out ../../test/runtimes/browsers/pages/chacha20poly1305/docs mod.ts
72+
npx typedoc --name "@hpke/dhkem-x448 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/docs mod.ts
6573
deno task dnt
66-
deno task minify > ../../test/runtimes/browsers/pages/chacha20poly1305/src/hpke-chacha20poly1305.js
67-
- working-directory: ./x/hybridkem-x25519-kyber768
74+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-dhkem-x448.js
75+
- name: Build docs for @hpke/hybridkem-x25519-kyber768
76+
working-directory: ./x/hybridkem-x25519-kyber768
6877
run: |
69-
npx typedoc --name "@hpke/hybridkem-x25519-kyber768 $(git describe --tags --abbrev=0)" --out ../../test/runtimes/browsers/pages/hybridkem-x25519-kyber768/docs mod.ts
78+
npx typedoc --name "@hpke/hybridkem-x25519-kyber768 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/docs mod.ts
7079
deno task dnt
71-
deno task minify > ../../test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-hybridkem-x25519-kyber768.js
72-
- working-directory: ./x/dhkem-secp256k1
80+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-hybridkem-x25519-kyber768.js
81+
- name: Build docs for @hpke/dhkem-secp256k1
82+
working-directory: ./x/dhkem-secp256k1
7383
run: |
74-
npx typedoc --name "@hpke/dhkem-secp256k1 $(git describe --tags --abbrev=0)" --out ../../test/runtimes/browsers/pages/dhkem-secp256k1/docs mod.ts
84+
npx typedoc --name "@hpke/dhkem-secp256k1 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/docs mod.ts
7585
deno task dnt
76-
deno task minify > ../../test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-dhkem-secp256k1.js
86+
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-dhkem-secp256k1.js
7787
- uses: peaceiris/actions-gh-pages@v3
7888
with:
7989
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
@@ -86,9 +96,7 @@ jobs:
8696
- uses: actions/checkout@v4
8797
- uses: actions/setup-node@v4
8898
- uses: microsoft/playwright-github-action@v1
89-
- working-directory: ./test/runtimes/browsers
90-
run: npm install && npx playwright install && npx playwright test
91-
- working-directory: ./core/test/runtimes/browsers
99+
- working-directory: ./x/core/test/runtimes/browsers
92100
run: npm install && npx playwright install && npx playwright test
93101
- working-directory: ./x/dhkem-x25519/test/runtimes/browsers
94102
run: npm install && npx playwright install && npx playwright test
@@ -100,3 +108,5 @@ jobs:
100108
run: npm install && npx playwright install && npx playwright test
101109
- working-directory: ./x/dhkem-secp256k1/test/runtimes/browsers
102110
run: npm install && npx playwright install && npx playwright test
111+
- working-directory: ./x/hpke-js/test/runtimes/browsers
112+
run: npm install && npx playwright install && npx playwright test

tsconfig.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@
99
"allowImportingTsExtensions": true
1010
},
1111
"include": [
12-
"core/**/*",
13-
"mod.ts",
14-
"src/**/*"
12+
"x/**/*"
1513
],
1614
"exclude": [
17-
"core/dnt.ts",
18-
"core/samples/**/*",
19-
"core/test/**/*",
20-
"src/test/**/*"
15+
"x/**/samples/**/*",
16+
"x/**/test/**/*"
2117
]
2218
}

x/hpke-js/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
"module": "es2022",
44
"target": "es2022",
55
"paths": {
6-
"@hpke/core": ["../../core/mod.ts"]
6+
"@hpke/core": "../core/mod.ts",
7+
"@hpke/chacha20poly1305": "../chacha20poly1305/mod.ts",
8+
"@hpke/dhkem-x25519": "../dhkem-x25519/mod.ts",
9+
"@hpke/dhkem-x448": "../dhkem-x448/mod.ts",
10+
711
},
812
"allowImportingTsExtensions": true
913
},

0 commit comments

Comments
 (0)