diff --git a/.github/workflows/ci_cloudflare.yml b/.github/workflows/ci_cloudflare.yml index 28ce6cbd4..9007d7048 100644 --- a/.github/workflows/ci_cloudflare.yml +++ b/.github/workflows/ci_cloudflare.yml @@ -22,89 +22,95 @@ jobs: node-version: v20.x - name: Install esbuild run: npm install -g esbuild - - name: Run dnt - run: deno run -A dnt.ts 0.0.0 - - name: Run npm pack - working-directory: ./npm + - name: Prepare test for ./x/core + working-directory: ./x/core + run: | + deno run -A dnt.ts 0.0.0 + deno task minify > ../chacha20poly1305/test/runtimes/hpke-core.js + 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 - working-directory: ./test/runtimes/cloudflare + - name: Run test for ./x/core + working-directory: ./x/core/test/runtimes/cloudflare run: | npm install nohup npm start & sleep 3 - deno test hpke.spec.ts --allow-net --config ../../../deno.json - - working-directory: ./core + deno test core.spec.ts --allow-net --config ../../../deno.json + - name: Prepare test for ./x/chacha20poly1305 + working-directory: ./x/chacha20poly1305 run: | deno task dnt - deno run -A dnt.ts 0.0.0 - deno task minify > ../x/dhkem-x25519/test/runtimes/hpke-core.js - deno task minify > ../x/dhkem-x448/test/runtimes/hpke-core.js - deno task minify > ../x/chacha20poly1305/test/runtimes/hpke-core.js - deno task minify > ../x/hybridkem-x25519-kyber768/test/runtimes/hpke-core.js - deno task minify > ../x/dhkem-secp256k1/test/runtimes/hpke-core.js - - name: Run npm pack for core - working-directory: ./core/npm - run: npm pack - - name: Run test for core - working-directory: ./core/test/runtimes/cloudflare + deno task minify > test/runtimes/hpke-chacha20poly1305.js + - name: Run test for chacha20poly1305 + working-directory: ./x/chacha20poly1305/test/runtimes/cloudflare run: | npm install nohup npm start & sleep 3 - deno test core.spec.ts --allow-net --config ../../../deno.json - - working-directory: ./x/dhkem-x25519 + 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 dhkem-x25519 + - 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 - - working-directory: ./x/dhkem-x448 + - 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 dhkem-x448 + - 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 - - working-directory: ./x/chacha20poly1305 - run: | - deno task dnt - deno task minify > test/runtimes/hpke-chacha20poly1305.js - - name: Run test for 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 - - working-directory: ./x/hybridkem-x25519-kyber768 + - 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 hybridkem-x25519-kyber768 + - 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 - - working-directory: ./x/dhkem-secp256k1 + - 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 dhkem-secp256k1 + - 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 0.0.0 + - 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 \ No newline at end of file diff --git a/x/core/test/runtimes/cloudflare/package.json b/x/core/test/runtimes/cloudflare/package.json index 8905ff94b..5d351ca3a 100644 --- a/x/core/test/runtimes/cloudflare/package.json +++ b/x/core/test/runtimes/cloudflare/package.json @@ -10,6 +10,6 @@ "deploy": "wrangler publish" }, "dependencies": { - "@hpke/core": "file:../../../npm/hpke-core-0.0.0.tgz" + "@hpke/core": "file:../../../../../npm-packages/x/core/hpke-core-0.0.0.tgz" } } diff --git a/x/hpke-js/test/runtimes/cloudflare/package.json b/x/hpke-js/test/runtimes/cloudflare/package.json index 1ded7ead5..42db62731 100644 --- a/x/hpke-js/test/runtimes/cloudflare/package.json +++ b/x/hpke-js/test/runtimes/cloudflare/package.json @@ -10,6 +10,6 @@ "deploy": "wrangler publish" }, "dependencies": { - "@dajiaji/hpke": "file:../../../npm/hpke-js-0.0.0.tgz" + "@hpke/hpke-js": "file:../../../../../npm-packages/x/hpke-js/hpke-js-0.0.0.tgz" } }