Skip to content

Commit 4596610

Browse files
committed
🔨 use deno
1 parent bc285a1 commit 4596610

5 files changed

Lines changed: 18 additions & 2011 deletions

File tree

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: CodSpeed
1+
name: Benchmark
22

33
on:
44
push:
5-
branches: main
5+
branches: [main]
66
pull_request:
7-
branches: main
7+
branches: [main]
88
# `workflow_dispatch` allows CodSpeed to trigger backtest
99
# performance analysis in order to generate initial data.
1010
workflow_dispatch:
@@ -38,10 +38,10 @@ jobs:
3838
run: make
3939

4040
- name: Install dependencies
41-
run: npm install
41+
run: deno install
4242

4343
- name: Run benchmarks
4444
uses: CodSpeedHQ/action@v4
4545
with:
4646
mode: simulation
47-
run: npx vitest bench --run
47+
run: deno task bench

deno.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,18 @@
77
"fmt:check": "deno fmt --check && clang-format --dry-run --Werror src/*.c src/*.h",
88
"build:npm": "deno run -A tasks/build-npm.ts",
99
"build:jsr": "deno run -A tasks/build-jsr.ts",
10-
"demo": "deno run demo/keyboard.ts"
10+
"demo": "deno run demo/keyboard.ts",
11+
"bench": "deno run -A npm:vitest bench --run"
1112
},
1213
"imports": {
1314
"@std/testing": "jsr:@std/testing@1",
1415
"@std/expect": "jsr:@std/expect@1",
1516
"@sinclair/typebox": "npm:@sinclair/typebox@^0.34",
1617
"dnt": "jsr:@deno/dnt@0.42.3",
1718
"effection": "npm:effection@^4.0.2",
18-
"@std/encoding": "jsr:@std/encoding@1"
19+
"@std/encoding": "jsr:@std/encoding@1",
20+
"@codspeed/vitest-plugin": "npm:@codspeed/vitest-plugin@^5.4.0",
21+
"vitest": "npm:vitest@^4.1.7"
1922
},
2023
"exports": {
2124
".": "./mod.ts",
@@ -26,11 +29,11 @@
2629
"exclude": ["!wasm.ts"]
2730
},
2831
"fmt": {
29-
"exclude": ["clay", "build", "bench", "node_modules"]
32+
"exclude": ["clay", "build"]
3033
},
3134
"lint": {
3235
"rules": { "exclude": ["prefer-const"] },
33-
"exclude": ["clay", "build", "bench", "node_modules"],
36+
"exclude": ["clay", "build"],
3437
"plugins": ["lint/prefer-let.ts"]
3538
}
3639
}

deno.lock

Lines changed: 6 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)