Skip to content

Commit 5097859

Browse files
committed
Benchmarks from js-reactivity-benchmark in CI
1 parent fba09f8 commit 5097859

File tree

6 files changed

+374
-1
lines changed

6 files changed

+374
-1
lines changed

.github/workflows/ci.yml

+19
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,22 @@ jobs:
2929
- run: pnpm lint
3030
- run: pnpm build
3131
- run: pnpm vitest ${{ matrix.testenv.args }}
32+
benchmarks:
33+
runs-on: ubuntu-latest
34+
timeout-minutes: 10
35+
permissions:
36+
contents: write
37+
steps:
38+
- uses: actions/checkout@v4
39+
- uses: wyvox/action-setup-pnpm@v3
40+
- run: pnpm install
41+
- run: pnpm benchmarks
42+
- uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 #v1.20.4
43+
with:
44+
name: Benchmarks
45+
tool: 'customSmallerIsBetter'
46+
output-file-path: benchmarks.json
47+
auto-push: ${{ github.event_name == 'push' }}
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
comment-on-alert: true
50+
summary-always: true

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,6 @@ build
4747
dist/
4848
*.tsbuildinfo
4949
.DS_Store
50+
51+
# Benchmarks result:
52+
benchmarks.json

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@
2525
"lint:types": "tsc --noEmit",
2626
"lint:prettier": "prettier --check .",
2727
"lint:fix": "prettier --write .",
28-
"test": "vitest"
28+
"test": "vitest",
29+
"benchmarks": "esbuild tests/benchmarks/benchmarks.ts --bundle --format=esm --platform=node --outdir=build --sourcemap=external && node --expose-gc ./build/benchmarks.js"
2930
},
3031
"devDependencies": {
32+
"esbuild": "^0.25.0",
33+
"js-reactivity-benchmark": "divdavem/js-reactivity-benchmark#77a55ade586a1aac5a67265a4892ff9ae7902500",
3134
"@types/node": "^20.11.25",
3235
"@vitest/browser": "^1.5.3",
3336
"concurrently": "^9.0.1",

0 commit comments

Comments
 (0)