1+ name : Benchmark Proxy
2+ on :
3+ pull_request :
4+ branches :
5+ - main
6+ push :
7+ branches :
8+ - main
9+ workflow_dispatch :
10+
11+ env :
12+ CARGO_TERM_COLOR : always
13+
14+ permissions :
15+ # deployments permission to deploy GitHub pages website
16+ deployments : write
17+ # contents permission to update benchmark contents in gh-pages branch
18+ contents : write
19+
20+ jobs :
21+ benchmark :
22+ name : Performance regression check
23+ runs-on : buildjet-16vcpu-ubuntu-2204
24+ steps :
25+ - uses : actions/checkout@v4
26+ - uses : ./.github/actions/setup-test
27+ - run : |
28+ mise run postgres:up --extra-args "--detach --wait"
29+ - name : Run benchmark
30+ working-directory : tests/benchmark
31+ env :
32+ CS_WORKSPACE_ID : ${{ secrets.CS_WORKSPACE_ID }}
33+ CS_CLIENT_ACCESS_KEY : ${{ secrets.CS_CLIENT_ACCESS_KEY }}
34+ CS_DEFAULT_KEYSET_ID : ${{ secrets.CS_DEFAULT_KEYSET_ID }}
35+ CS_CLIENT_ID : ${{ secrets.CS_CLIENT_ID }}
36+ CS_CLIENT_KEY : ${{ secrets.CS_CLIENT_KEY }}
37+ RUST_BACKTRACE : " 1"
38+ run : mise run benchmark:continuous
39+ # Download previous benchmark result from cache (if exists)
40+ - name : Download previous benchmark data
41+ uses : actions/cache@v4
42+ with :
43+ path : ./cache
44+ key : ${{ runner.os }}-benchmark
45+ # Run `github-action-benchmark` action
46+ - name : Store benchmark result
47+ uses : benchmark-action/github-action-benchmark@v1
48+ with :
49+ # What benchmark tool the output.txt came from
50+ tool : ' customSmallerIsBetter'
51+ # Where the output from the benchmark tool is stored
52+ output-file-path : tests/benchmarks/results/output.json
53+ # Where the previous data file is stored
54+ external-data-json-path : ./cache/benchmark-data.json
55+ # Workflow will fail when an alert happens
56+ fail-on-alert : true
57+ # Enable alert commit comment
58+ comment-on-alert : true
59+ # GitHub API token to make a commit comment
60+ github-token : ${{ secrets.GITHUB_TOKEN }}
61+ # Enable Job Summary for PRs
62+ summary-always : true
63+ auto-push : true
0 commit comments