bench #4
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: bench | |
| on: | |
| schedule: | |
| # Every Monday 06:00 UTC. | |
| - cron: "0 6 * * 1" | |
| workflow_dispatch: | |
| jobs: | |
| loop_prevention: | |
| name: loop prevention | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.9.9" | |
| - run: uv python install 3.12 | |
| - run: uv venv --python 3.12 .venv | |
| - run: uv pip install --python .venv/bin/python -e ".[dev]" | |
| - name: run benchmark | |
| run: | | |
| .venv/bin/python -m benchmarks.loop_prevention.run \ | |
| --out "benchmarks/results/$(date -u +%Y-%m-%d)-loop-prevention.json" \ | |
| --strict | |
| - name: commit results | |
| if: github.ref == 'refs/heads/main' | |
| run: | | |
| git config user.name "gr0m_mem-bot" | |
| git config user.email "actions@users.noreply.github.com" | |
| git add benchmarks/results/ | |
| if ! git diff --cached --quiet; then | |
| git commit -m "bench: weekly loop_prevention results" | |
| git push | |
| fi |