-
Notifications
You must be signed in to change notification settings - Fork 9
145 lines (141 loc) · 8.62 KB
/
ci_browser.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: Browser CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v1
with:
deno-version: 2.x
- uses: actions/setup-node@v4
with:
node-version: v20.x
- name: Install dependencies
run: |
npm install -g typescript
npm install -g typedoc
npm install -g esbuild
- name: Run dnt
run: deno task dnt
- name: Run npm install
working-directory: ./npm
run: npm install
- name: Create pages directory
working-directory: ./packages/hpke-js
run: |
mkdir test/runtimes/browsers/pages/core
cp -rf ../core/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/core
mkdir test/runtimes/browsers/pages/chacha20poly1305
cp -rf ../chacha20poly1305/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/chacha20poly1305
mkdir test/runtimes/browsers/pages/dhkem-x25519
cp -rf ../dhkem-x25519/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x25519
mkdir test/runtimes/browsers/pages/dhkem-x448
cp -rf ../dhkem-x448/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-x448
mkdir test/runtimes/browsers/pages/hybridkem-x25519-kyber768
cp -rf ../hybridkem-x25519-kyber768/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x25519-kyber768
mkdir test/runtimes/browsers/pages/hybridkem-x-wing
cp -rf ../hybridkem-x-wing/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/hybridkem-x-wing
mkdir test/runtimes/browsers/pages/ml-kem
cp -rf ../ml-kem/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/ml-kem
mkdir test/runtimes/browsers/pages/dhkem-secp256k1
cp -rf ../dhkem-secp256k1/test/runtimes/browsers/pages/* test/runtimes/browsers/pages/dhkem-secp256k1
- name: Build docs for @hpke/common
working-directory: ./packages/common
run: |
npx typedoc --name "@hpke/common" --out ../hpke-js/test/runtimes/browsers/pages/common/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/core/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/ml-kem/src/hpke-common.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-common.js
- name: Build docs for @hpke/core
working-directory: ./packages/core
run: |
npx typedoc --name "@hpke/core $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/core/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/core/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/ml-kem/src/hpke-core.js
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-core.js
- name: Build docs for @hpke/chacha20poly1305
working-directory: ./packages/chacha20poly1305
run: |
npx typedoc --name "@hpke/chacha20poly1305 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/chacha20poly1305/src/hpke-chacha20poly1305.js
- name: Build docs for @hpke/dhkem-x25519
working-directory: ./packages/dhkem-x25519
run: |
npx typedoc --name "@hpke/dhkem-x25519 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x25519/src/hpke-dhkem-x25519.js
- name: Build docs for @hpke/dhkem-x448
working-directory: ./packages/dhkem-x448
run: |
npx typedoc --name "@hpke/dhkem-x448 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-x448/src/hpke-dhkem-x448.js
- name: Build docs for @hpke/hybridkem-x25519-kyber768
working-directory: ./packages/hybridkem-x25519-kyber768
run: |
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
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x25519-kyber768/src/hpke-hybridkem-x25519-kyber768.js
- name: Build docs for @hpke/dhkem-secp256k1
working-directory: ./packages/dhkem-secp256k1
run: |
npx typedoc --name "@hpke/dhkem-secp256k1 $(git describe --tags --abbrev=0)" --out ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/dhkem-secp256k1/src/hpke-dhkem-secp256k1.js
- name: Build docs for @hpke/hybridkem-x-wing
working-directory: ./packages/hybridkem-x-wing
run: |
npx typedoc --name "@hpke/hybridkem-x-wing" --out ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/hybridkem-x-wing/src/hpke-hybridkem-x-wing.js
- name: Build docs for @hpke/ml-kem
working-directory: ./packages/ml-kem
run: |
npx typedoc --name "@hpke/ml-kem" --out ../hpke-js/test/runtimes/browsers/pages/ml-kem/docs mod.ts
deno task minify > ../hpke-js/test/runtimes/browsers/pages/ml-kem/src/hpke-ml-kem.js
- name: Build docs for @hpke/hpke-js
working-directory: ./packages/hpke-js
run: |
npx typedoc --name "@hpke/hpke-js $(git describe --tags --abbrev=0)" --out test/runtimes/browsers/pages/docs mod.ts
deno task minify > test/runtimes/browsers/pages/src/hpke.js
- uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: ./packages/hpke-js/test/runtimes/browsers/pages
playwright-test:
needs: pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: microsoft/playwright-github-action@v1
- working-directory: ./packages/core/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/dhkem-x25519/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/dhkem-x448/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/chacha20poly1305/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hybridkem-x25519-kyber768/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hybridkem-x-wing/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/ml-kem/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/dhkem-secp256k1/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test
- working-directory: ./packages/hpke-js/test/runtimes/browsers
run: npm install && npx playwright install && npx playwright test