Skip to content

Commit

Permalink
Use npm link on Cloudflare CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
dajiaji committed Sep 1, 2024
1 parent fd58cbe commit 52e8d36
Showing 1 changed file with 14 additions and 42 deletions.
56 changes: 14 additions & 42 deletions .github/workflows/ci_cloudflare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,93 +22,65 @@ jobs:
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
- name: Run npm pack for ./x/core
working-directory: ./npm-packages/x/core
run: npm pack
- name: Prepare test
run: deno task npm
- name: Run test for ./x/core
working-directory: ./x/core/test/runtimes/cloudflare
run: |
npm link @hpke/core
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 link @hpke/core
npm link @hpke/chacha20poly1305
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
- name: Run npm pack for ./x/dhkem-x25519
working-directory: ./npm-packages/x/dhkem-x25519
run: npm pack
- name: Run test for ./x/dhkem-x25519
working-directory: ./x/dhkem-x25519/test/runtimes/cloudflare
run: |
npm link @hpke/core
npm link @hpke/dhkem-x25519
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
- name: Run npm pack for ./x/dhkem-x448
working-directory: ./npm-packages/x/dhkem-x448
run: npm pack
- name: Run test for ./x/dhkem-x448
working-directory: ./x/dhkem-x448/test/runtimes/cloudflare
run: |
npm link @hpke/core
npm link @hpke/dhkem-x448
npm install
nohup npm start &
sleep 3
deno test dhkem-x448.spec.ts --allow-net --config ../../../deno.json
- name: Prepare test for ./x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1
run: deno task dnt
- name: Run npm pack for ./x/dhkem-secp256k1
working-directory: ./npm-packages/x/dhkem-secp256k1
run: npm pack
- name: Run test for ./x/dhkem-secp256k1
working-directory: ./x/dhkem-secp256k1/test/runtimes/cloudflare
run: |
npm link @hpke/core
npm link @hpke/dhkem-secp256k1
npm install
nohup npm start &
sleep 3
deno test dhkem-secp256k1.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
- name: Run npm pack for ./x/hybridkem-x25519-kyber768
working-directory: ./npm-packages/x/hybridkem-x25519-kyber768
run: npm pack
- name: Run test for ./x/hybridkem-x25519-kyber768
working-directory: ./x/hybridkem-x25519-kyber768/test/runtimes/cloudflare
run: |
npm link @hpke/core
npm link @hpke/hybridkem-x25519-kyber768
npm install
nohup npm start &
sleep 3
deno test hybridkem-x25519-kyber768.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 link hpke-js
npm install
nohup npm start &
sleep 3
Expand Down

0 comments on commit 52e8d36

Please sign in to comment.