Benchmarks #20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmarks | |
| on: | |
| # Run weekly on Mondays at 06:00 UTC | |
| schedule: | |
| - cron: "0 6 * * 1" | |
| # Allow manual trigger | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| bench: | |
| name: Run Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run benchmarks and generate report | |
| run: bun run bench:report | |
| - name: Upload JSON results | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bench-results | |
| path: reports/bench-results.json | |
| retention-days: 90 | |
| - name: Commit updated report | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add reports/benchmarks.md | |
| if git diff --staged --quiet; then | |
| echo "No changes to benchmark report" | |
| else | |
| git commit -m "docs: update benchmark report" | |
| git push | |
| fi |