Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use npm link on Cloudflare CI. #371

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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-packages/x/core/hpke-core-1.3.0.tgz"
"@hpke/core": "^1.3.0"
}
}
Loading