build(deps): bump pymdown-extensions from 10.21.2 to 11.0.1 #5
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: Benchmark | |
| on: | |
| pull_request: | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@e92bafb6253dcd438e0484186d7669ea7a8ca1cc # v6.4.3 | |
| - name: Install dependencies (PR branch) | |
| run: uv sync --frozen | |
| - name: Benchmark current (PR branch) | |
| run: > | |
| uv run pytest | |
| src/gps_logger_parser/tests/test_benchmark.py | |
| --benchmark-json=bench_current.json | |
| --benchmark-min-rounds=5 | |
| -q | |
| - name: Save current benchmark | |
| run: cp bench_current.json /tmp/bench_current.json | |
| - name: Checkout base branch | |
| run: git checkout ${{ github.event.pull_request.base.sha }} | |
| - name: Install dependencies (base branch) | |
| run: uv sync | |
| - name: Benchmark baseline (base branch) | |
| id: baseline | |
| run: > | |
| uv run pytest | |
| src/gps_logger_parser/tests/test_benchmark.py | |
| --benchmark-json=bench_baseline.json | |
| --benchmark-min-rounds=5 | |
| -q | |
| continue-on-error: true | |
| - name: Checkout PR branch again | |
| run: git checkout ${{ github.event.pull_request.head.sha }} | |
| - name: Restore current benchmark | |
| run: cp /tmp/bench_current.json bench_current.json | |
| - name: Generate comparison report | |
| run: | | |
| if [ -f bench_baseline.json ]; then | |
| uv run python scripts/benchmark_compare.py bench_baseline.json bench_current.json > benchmark_report.md | |
| else | |
| echo "No baseline benchmark available (benchmark test may not exist on base branch)." > benchmark_report.md | |
| fi | |
| - name: Post benchmark comment | |
| uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 | |
| with: | |
| issue-number: ${{ github.event.pull_request.number }} | |
| body-path: benchmark_report.md | |
| comment-tag: benchmark-report |