Skip to content

Commit 75e1ed6

Browse files
committed
Keep benchmark runs independent of PR comments
1 parent 85a3c8b commit 75e1ed6

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/benchmark-clawbench.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ jobs:
200200
permissions:
201201
contents: read
202202
issues: write
203+
pull-requests: write
203204
concurrency:
204205
group: benchmark-clawbench-${{ needs.resolve.outputs.pr_number || needs.resolve.outputs.head_sha }}
205206
cancel-in-progress: false
@@ -231,6 +232,7 @@ jobs:
231232
steps:
232233
- name: Mark the PR benchmark as running
233234
if: needs.resolve.outputs.pr_number != ''
235+
continue-on-error: true
234236
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
235237
env:
236238
PR_NUMBER: ${{ needs.resolve.outputs.pr_number }}
@@ -434,6 +436,7 @@ jobs:
434436
435437
- name: Update PR benchmark comment
436438
if: always() && needs.resolve.outputs.pr_number != ''
439+
continue-on-error: true
437440
uses: actions/github-script@f28e40c7f34bde8b3046d885e986cb6290c5673b # v7.1.0
438441
env:
439442
PR_NUMBER: ${{ needs.resolve.outputs.pr_number }}

‎benchmarks/harbor/results.test.ts‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,13 @@ describe("benchmark workflow hardening", () => {
369369
expect(workflow).not.toContain("baseSha = pull.base.sha");
370370
expect(workflow).toContain('HARBOR_VERSION: "0.21.0"');
371371
expect(workflow).toContain('CODEX_BENCHMARK_VERSION: "0.120.0"');
372+
expect(workflow).toContain("issues: write\n pull-requests: write");
373+
expect(workflow).toMatch(
374+
/- name: Mark the PR benchmark as running\n\s+if:.*\n\s+continue-on-error: true/,
375+
);
376+
expect(workflow).toMatch(
377+
/- name: Update PR benchmark comment\n\s+if:.*\n\s+continue-on-error: true/,
378+
);
372379
expect(workflow).toContain(
373380
'statuses=(--status "candidate=${CANDIDATE_STATUS:-1}")',
374381
);

0 commit comments

Comments
 (0)