Skip to content

Commit cf85abe

Browse files
fix(ci): skip coverage annotation in nightly workflow (#229)
Scheduled workflow runs cannot have checks: write permission, which causes the nightly CI to fail when calling the test workflow. Add an input parameter to test.yml to optionally skip the coverage annotation step, and enable it for nightly runs. Co-authored-by: Claude <[email protected]>
1 parent 534d506 commit cf85abe

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/nightly.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ permissions:
1212
jobs:
1313
test:
1414
uses: ./.github/workflows/test.yml
15+
with:
16+
skip_coverage_annotation: true

.github/workflows/test.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ name: Test
22

33
on:
44
workflow_call:
5+
inputs:
6+
skip_coverage_annotation:
7+
description: 'Skip coverage annotation (required for scheduled runs that lack checks: write permission)'
8+
required: false
9+
default: false
10+
type: boolean
511

612
permissions:
713
contents: read
@@ -53,6 +59,7 @@ jobs:
5359
run: php scripts/check-coverage-threshold.php build/logs/clover.xml
5460

5561
- name: Code Coverage Annotation
62+
if: ${{ !inputs.skip_coverage_annotation }}
5663
uses: ggilder/codecoverage@47c83daaf1d5a3190cad56363baf459c59114170 # v1
5764
with:
5865
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)