Skip to content

Commit 6f52529

Browse files
committed
chore: set check for benchmark
1 parent 4de4b65 commit 6f52529

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ on:
1717
permissions:
1818
id-token: write
1919
pull-requests: write
20+
statuses: write
2021
contents: write
2122

2223
jobs:

.github/workflows/trusted-benchmark.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ on:
1515
permissions:
1616
id-token: write
1717
pull-requests: write
18+
statuses: write
1819
contents: read
1920

2021
env:
@@ -95,13 +96,32 @@ jobs:
9596
sudo cp ./target/release/databend-* /usr/local/bin/
9697
databend-query --version
9798
databend-meta --version
99+
- name: Set github check status to pending
100+
uses: Sibz/github-status-action@v1
101+
with:
102+
authToken: ${{ secrets.GITHUB_TOKEN }}
103+
context: 'Benchmark Local / ${{ matrix.dataset }}'
104+
description: 'Running'
105+
state: 'pending'
106+
sha: ${{ needs.metadata.outputs.sha }}
107+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
98108
- uses: ./.github/actions/benchmark_local
99109
with:
100110
sha: ${{ needs.metadata.outputs.sha }}
101111
run_id: ${{ needs.metadata.outputs.run_id }}
102112
dataset: ${{ matrix.dataset }}
103113
source: ${{ needs.metadata.outputs.source }}
104114
source_id: ${{ needs.metadata.outputs.source_id }}
115+
- name: Set github check status to completed
116+
if: always()
117+
uses: Sibz/github-status-action@v1
118+
with:
119+
authToken: ${{ secrets.GITHUB_TOKEN }}
120+
context: 'Benchmark Local / ${{ matrix.dataset }}'
121+
description: 'Completed'
122+
state: ${{ job.status }}
123+
sha: ${{ needs.metadata.outputs.sha }}
124+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
105125

106126
docker:
107127
needs: metadata
@@ -172,7 +192,17 @@ jobs:
172192
steps:
173193
- uses: actions/checkout@v3
174194
- uses: ./.github/actions/setup_bendsql
195+
- name: Set github check status to pending
196+
uses: Sibz/github-status-action@v1
197+
with:
198+
authToken: ${{ secrets.GITHUB_TOKEN }}
199+
context: 'Benchmark Cloud / ${{ matrix.dataset }}(${{ matrix.size }})'
200+
description: 'Running'
201+
state: 'pending'
202+
sha: ${{ needs.metadata.outputs.sha }}
203+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
175204
- uses: ./.github/actions/benchmark_cloud
205+
id: benchmark
176206
with:
177207
sha: ${{ needs.metadata.outputs.sha }}
178208
run_id: ${{ needs.metadata.outputs.run_id }}
@@ -185,6 +215,16 @@ jobs:
185215
cloud_password: ${{ secrets.BENCHMARK_CLOUD_PASSWORD }}
186216
cloud_org: ${{ secrets.BENCHMARK_CLOUD_ORG }}
187217
cloud_endpoint: ${{ secrets.BENCHMARK_CLOUD_ENDPOINT }}
218+
- name: Set github check status to completed
219+
if: always()
220+
uses: Sibz/github-status-action@v1
221+
with:
222+
authToken: ${{ secrets.GITHUB_TOKEN }}
223+
context: 'Benchmark Cloud / ${{ matrix.dataset }}(${{ matrix.size }})'
224+
description: 'Completed'
225+
state: ${{ job.status }}
226+
sha: ${{ needs.metadata.outputs.sha }}
227+
target_url: https://github.com/datafuselabs/databend/actions/runs/${{ github.run_id }}/jobs/${{ github.job_id }}
188228

189229
comment_on_pr:
190230
runs-on: [self-hosted, X64, Linux, dev]

0 commit comments

Comments
 (0)