Refine chacha20poly1305 test for cloudflare workers. #516
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Cloudflare Workers CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: v20.x | |
- name: Install esbuild | |
run: npm install -g esbuild | |
- name: Prepare test for ./x/core | |
working-directory: ./x/core | |
run: | | |
deno task dnt | |
deno task minify > ../dhkem-x25519/test/runtimes/hpke-core.js | |
deno task minify > ../dhkem-x448/test/runtimes/hpke-core.js | |
deno task minify > ../hybridkem-x25519-kyber768/test/runtimes/hpke-core.js | |
deno task minify > ../dhkem-secp256k1/test/runtimes/hpke-core.js | |
- name: Run npm pack for ./x/core | |
working-directory: ./npm-packages/x/core | |
run: npm pack | |
- name: Run test for ./x/core | |
working-directory: ./x/core/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test core.spec.ts --allow-net --config ../../../deno.json | |
- name: Prepare test for ./x/chacha20poly1305 | |
working-directory: ./x/chacha20poly1305 | |
run: deno task dnt | |
- name: Run npm pack for ./x/chacha20poly1305 | |
working-directory: ./npm-packages/x/chacha20poly1305 | |
run: npm pack | |
- name: Run test for ./x/chacha20poly1305 | |
working-directory: ./x/chacha20poly1305/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test chacha20poly1305.spec.ts --allow-net --config ../../../deno.json | |
- name: Prepare test for ./x/dhkem-x25519 | |
working-directory: ./x/dhkem-x25519 | |
run: | | |
deno task dnt | |
deno task minify > test/runtimes/hpke-dhkem-x25519.js | |
- name: Run test for ./x/dhkem-x25519 | |
working-directory: ./x/dhkem-x25519/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test dhkem-x25519.spec.ts --allow-net --config ../../../deno.json | |
- name: Prepare test for ./x/dhkem-x448 | |
working-directory: ./x/dhkem-x448 | |
run: | | |
deno task dnt | |
deno task minify > test/runtimes/hpke-dhkem-x448.js | |
- name: Run test for ./x/dhkem-x448 | |
working-directory: ./x/dhkem-x448/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test dhkem-x448.spec.ts --allow-net --config ../../../deno.json | |
- name: Prepare test for ./x/hybridkem-x25519-kyber768 | |
working-directory: ./x/hybridkem-x25519-kyber768 | |
run: | | |
deno task dnt | |
deno task minify > test/runtimes/hpke-hybridkem-x25519-kyber768.js | |
- name: Run test for ./x/hybridkem-x25519-kyber768 | |
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test hybridkem-x25519-kyber768.spec.ts --allow-net --config ../../../deno.json | |
- name: Prepare test for ./x/dhkem-secp256k1 | |
working-directory: ./x/dhkem-secp256k1 | |
run: | | |
deno task dnt | |
deno task minify > test/runtimes/hpke-dhkem-secp256k1.js | |
- name: Run test for ./x/dhkem-secp256k1 | |
working-directory: ./x/dhkem-secp256k1/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test dhkem-secp256k1.spec.ts --allow-net --config ../../../deno.json | |
- name: Prepare test for hpke-js | |
working-directory: ./x/hpke-js | |
run: deno run -A dnt.ts | |
- name: Run npm pack for ./x/hpke-js | |
working-directory: ./npm-packages/x/hpke-js | |
run: npm pack | |
- name: Run test for ./x/hpke-js | |
working-directory: ./x/hpke-js/test/runtimes/cloudflare | |
run: | | |
npm install | |
nohup npm start & | |
sleep 3 | |
deno test hpke.spec.ts --allow-net --config ../../../deno.json |