mirror of
https://github.com/lvgl/lvgl.git
synced 2026-05-22 23:37:43 +08:00
feat(scripts): add automatic gcovr code coverage analysis (#9227)
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com> Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
@@ -135,6 +135,16 @@ jobs:
|
||||
run: echo "NON_AMD64_BUILD=1" >> $GITHUB_ENV
|
||||
- name: Run tests
|
||||
run: python tests/main.py --report --update-image test --auto-clean
|
||||
- name: Code coverage analysis
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
git fetch --no-tags --prune origin ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
|
||||
MB=$(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }})
|
||||
echo "Merge-base: $MB"
|
||||
python scripts/check_gcov_coverage.py --commit="${MB}...${{ github.event.pull_request.head.sha }}"
|
||||
else
|
||||
python scripts/check_gcov_coverage.py --commit=HEAD
|
||||
fi
|
||||
- name: Archive screenshot errors
|
||||
if: failure()
|
||||
uses: actions/upload-artifact@v5
|
||||
|
||||
Reference in New Issue
Block a user