-
Notifications
You must be signed in to change notification settings - Fork 142
40 lines (37 loc) · 1.05 KB
/
issue_bench.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Run benchmarks
on:
issues:
types: [opened]
jobs:
build:
runs-on: ubuntu-latest
if: startsWith(github.event.issue.title, 'RUN BENCHMARK')
steps:
- name: Accept the task
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.issue.number }}
body: |
Serving the benchmark. I will update the issue when it's finished.
- uses: actions/checkout@v4
- name: Build images
run: ./build.sh
- name: Run tests
id: run_bench
run: |
./bench.sh | tee bench.results
REPORT="$(cat bench.results)"
REPORT="${REPORT//'%'/'%25'}"
REPORT="${REPORT//$'\n'/'%0A'}"
REPORT="${REPORT//$'\r'/'%0D'}"
echo "::set-output name=results::$REPORT"
env:
GRPC_BENCHMARK_DURATION: ${{github.event.issue.body}}
- name: Close Issue
uses: peter-evans/close-issue@v3
with:
comment: |
Here you go!
```
${{ steps.run_bench.outputs.results }}
```