Skip to content

Commit fa87c2a

Browse files
committed
update ci pipeline
1 parent 32cffe3 commit fa87c2a

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
push:
66
branches:
77
- main
8-
- main
8+
99

1010
permissions:
1111
contents: read
@@ -70,13 +70,24 @@ jobs:
7070
workflow: ci.yml
7171
name: coverage-summary
7272
path: coverage-base-summary
73+
branch: main
7374
if_no_artifact_found: warn
7475

76+
- name: Check if base coverage exists
77+
id: base_coverage
78+
if: github.event_name == 'pull_request'
79+
run: |
80+
if [ -f "coverage-base-summary/coverage-summary.json" ]; then
81+
echo "exists=true" >> $GITHUB_OUTPUT
82+
else
83+
echo "exists=false" >> $GITHUB_OUTPUT
84+
fi
85+
7586
- name: Report Coverage
7687
if: always() && github.event_name == 'pull_request'
7788
uses: davelosert/vitest-coverage-report-action@v2
7889
with:
79-
json-summary-compare-path: coverage-base-summary/coverage-summary.json
90+
json-summary-compare-path: ${{ steps.base_coverage.outputs.exists == 'true' && 'coverage-base-summary/coverage-summary.json' || '' }}
8091

8192

8293
build:

0 commit comments

Comments
 (0)