Skip to content

Commit

Permalink
Update cloudflare CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Aug 24, 2024
1 parent 2862b1a commit b99aea9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 41 deletions.
84 changes: 45 additions & 39 deletions .github/workflows/ci_cloudflare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion x/core/test/runtimes/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
2 changes: 1 addition & 1 deletion x/hpke-js/test/runtimes/cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}

0 comments on commit b99aea9

Please sign in to comment.