🌱 add benchmark pipeline #11
Workflow file for this run
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 Test | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Install dependencies | |
run: | | |
go mod download | |
go mod tidy | |
# - name: Debug via SSH | |
# uses: mxschmitt/action-tmate@v3 | |
- name: Run benchmark test | |
# working-directory: test/e2e | |
run: | | |
ARTIFACT_PATH=/tmp/artifacts make test-benchmark | |
- name: Upload benchmark results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: benchmark-artifacts | |
path: /tmp/artifacts/ | |
- name: Compare with baseline | |
run: | | |
go install golang.org/x/perf/cmd/benchstat@latest | |
benchstat benchmarks/baseline.txt new.txt | |