Skip to content

Commit

Permalink
Benchmarks from js-reactivity-benchmark in CI (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
divdavem authored Feb 13, 2025
1 parent fba09f8 commit cc29d0b
Show file tree
Hide file tree
Showing 6 changed files with 374 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,22 @@ jobs:
- run: pnpm lint
- run: pnpm build
- run: pnpm vitest ${{ matrix.testenv.args }}
benchmarks:
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: wyvox/action-setup-pnpm@v3
- run: pnpm install
- run: pnpm benchmarks
- uses: benchmark-action/github-action-benchmark@d48d326b4ca9ba73ca0cd0d59f108f9e02a381c7 #v1.20.4
with:
name: Benchmarks
tool: 'customSmallerIsBetter'
output-file-path: benchmarks.json
auto-push: ${{ github.event_name == 'push' }}
github-token: ${{ secrets.GITHUB_TOKEN }}
comment-on-alert: true
summary-always: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,6 @@ build
dist/
*.tsbuildinfo
.DS_Store

# Benchmarks result:
benchmarks.json
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@
"lint:types": "tsc --noEmit",
"lint:prettier": "prettier --check .",
"lint:fix": "prettier --write .",
"test": "vitest"
"test": "vitest",
"benchmarks": "esbuild tests/benchmarks/benchmarks.ts --bundle --format=esm --platform=node --outdir=build --sourcemap=external && node --expose-gc ./build/benchmarks.js"
},
"devDependencies": {
"esbuild": "^0.25.0",
"js-reactivity-benchmark": "divdavem/js-reactivity-benchmark#77a55ade586a1aac5a67265a4892ff9ae7902500",
"@types/node": "^20.11.25",
"@vitest/browser": "^1.5.3",
"concurrently": "^9.0.1",
Expand Down
Loading

0 comments on commit cc29d0b

Please sign in to comment.