Skip to content

Commit f430f1a

Browse files
committed
fix: Correct awk comparison syntax in coverage summary step
Signed-off-by: shubham kumar <shubham.kumar@intel.com>
1 parent 5a15047 commit f430f1a

1 file changed

Lines changed: 0 additions & 43 deletions

File tree

.github/workflows/bindings-sysman-python-unit-tests-coverage.yml

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ jobs:
2727
working-directory: bindings/sysman/python
2828
permissions:
2929
contents: read
30-
pull-requests: write # For PR comments
3130
checks: write # For check results
3231

3332
steps:
@@ -275,48 +274,6 @@ jobs:
275274
echo "Coverage data file not found. Report not available." >> $GITHUB_STEP_SUMMARY
276275
fi
277276
278-
- name: Comment PR with Coverage
279-
if: github.event_name == 'pull_request'
280-
uses: actions/github-script@v7
281-
with:
282-
script: |
283-
const coverage = '${{ steps.coverage.outputs.coverage_pct }}';
284-
const baselineCoverage = '${{ steps.baseline.outputs.baseline_coverage }}' || '0';
285-
const coverageNum = parseFloat(coverage);
286-
const baselineNum = parseFloat(baselineCoverage);
287-
const passed = coverageNum >= baselineNum;
288-
const improvement = coverageNum - baselineNum;
289-
const isFirstBaseline = baselineNum === 0;
290-
291-
const body = `## 📊 Unit Tests & Coverage Report
292-
293-
${passed ? '✅' : '❌'} **Coverage:** ${coverage}%${isFirstBaseline ? ' (Baseline Established)' : ` vs ${baselineCoverage}% (target branch)`}
294-
295-
### Test Results
296-
- **Status:** ${passed ? 'PASSED' : 'FAILED'}
297-
- **Current Coverage:** ${coverage}%
298-
- **Target Branch Coverage:** ${baselineCoverage}%${isFirstBaseline ? ' (First commit with tests)' : ''}
299-
- **Change:** ${improvement > 0 ? '+' : ''}${improvement.toFixed(1)}%
300-
301-
${isFirstBaseline ?
302-
'🎉 Baseline coverage established at ' + coverage + '%! This will be used for future comparisons.' :
303-
(passed ?
304-
(improvement > 0 ?
305-
`🎉 Coverage improved by ${improvement.toFixed(1)}%! Great work on adding tests.` :
306-
'✅ Coverage maintained. No regression detected.') :
307-
'⚠️ Coverage regression detected. This PR would reduce test coverage. Please add more tests.')
308-
}
309-
310-
📁 Detailed reports are available in the workflow artifacts.
311-
`;
312-
313-
github.rest.issues.createComment({
314-
issue_number: context.issue.number,
315-
owner: context.repo.owner,
316-
repo: context.repo.repo,
317-
body: body
318-
});
319-
320277
- name: Upload Test Results
321278
uses: actions/upload-artifact@v4
322279
if: always()

0 commit comments

Comments
 (0)