File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change 55 push :
66 branches :
77 - main
8- - main
8+
99
1010permissions :
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 :
You can’t perform that action at this time.
0 commit comments