Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/jsruntime_L1tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: L1 Unit Tests for rdkNativeScript
permissions:
contents: read
checks: write
issues: write
pull-requests: write

on:
push:
Expand Down Expand Up @@ -90,7 +92,22 @@ jobs:
lcov --capture --directory . --output-file coverage.info --ignore-errors mismatch --rc geninfo_unexecuted_blocks=1
lcov --remove coverage.info '/usr/*' '*/test/*' '*/tests/*' '*/L1/*' '*/mocks/*' '*/gtest/*' '*/gmock/*' '*/googletest/*' '*/include/*' --output-file coverage.cleaned.info --ignore-errors unused
lcov --extract coverage.cleaned.info '*/src/*' --output-file coverage.final.info
genhtml coverage.final.info --output-directory html_coverage_report
genhtml coverage.final.info --output-directory html_coverage_report | tee genhtml.log

- name: Extract coverage percentage
run: |
COVERAGE_LINE=$(grep 'lines......:' build_l1/genhtml.log | grep -oE '[0-9.]+%' | head -n1)
echo "COVERAGE_LINE=$COVERAGE_LINE"
echo "COVERAGE_LINE=$COVERAGE_LINE" >> $GITHUB_ENV

- name: Post coverage percent to PR
if: ${{ github.event_name == 'pull_request' }}
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
## Test Coverage Report
**Lines:** ${{ env.COVERAGE_LINE }}

- name: Upload test result file (JUnit XML)
uses: actions/upload-artifact@v4
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.