Skip to content

Commit

Permalink
tests/examples: add a Deno integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
FiloSottile committed Feb 1, 2025
1 parent cdc4316 commit d3327a2
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 7 deletions.
36 changes: 32 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,17 @@ jobs:
- run: npm run lint
- run: npm run test
- run: npm run examples:node
esbuild:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22.x
- run: npm update
- run: npm run build
- run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- run: npm run examples:esbuild
bun:
Expand All @@ -36,10 +47,27 @@ jobs:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22.x
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- run: bun update --no-save
- run: bun run build
- run: bun run test:short
- run: bun run examples:bun
- run: npm update
- run: npm run build
- run: npm run examples:bun
deno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 22.x
- uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x
- run: npm update
- run: npm run build
- run: npm run examples:deno
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"test:short": "vitest --run --project node",
"examples:node": "cd tests/examples && npm update && npm run test:node",
"examples:bun": "cd tests/examples && bun update --no-save && bun run test:bun",
"examples:deno": "cd tests/examples && npm update && deno task test:deno",
"examples:esbuild": "cd tests/examples && npm update && npm run test:esbuild",
"bench": "vitest bench --run",
"lint": "eslint .",
Expand Down
1 change: 1 addition & 0 deletions tests/examples/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules
/package-lock.json
/bun.lockb
/deno.lock
/age.js
7 changes: 4 additions & 3 deletions tests/examples/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
{
"name": "age-examples",
"type": "module",
"workspaces": [
"../.."
],
"dependencies": {
"age-encryption": "file:../.."
},
"scripts": {
"test:node": "node identity.js && node passphrase.js",
"test:bun": "bun run identity.js && bun run passphrase.js",
"test:deno": "deno run identity.js && deno run passphrase.js",
"build:esbuild": "esbuild --target=es2022 --bundle --minify --outfile=age.js --global-name=age age-encryption",
"install:esbuild": "npx puppeteer browsers install chrome",
"test:esbuild": "npm run build:esbuild && npm run install:esbuild && node browser.js"
Expand Down

0 comments on commit d3327a2

Please sign in to comment.