Skip to content
This repository was archived by the owner on Dec 14, 2025. It is now read-only.

Commit ccbb0fd

Browse files
committed
[ACTION] Generate gcov repport in pytest action
1 parent 408dba5 commit ccbb0fd

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/workflows/pytest.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,21 @@ jobs:
3232
run: |
3333
. $IDF_PATH/export.sh
3434
(cd build; esptool.py --chip esp32 merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args)
35-
qemu-system-xtensa -machine esp32 -drive file=build/flash_image.bin,if=mtd,format=raw -serial file:serial_log.txt -display none -nic user,model=open_eth,id=lo0,hostfwd=tcp:127.0.0.1:8001-:80 -daemonize
35+
qemu-system-xtensa -machine esp32 -drive file=build/flash_image.bin,if=mtd,format=raw -serial file:serial_log.txt -serial file:gcov_data.gcfn -display none -nic user,model=open_eth,id=lo0,hostfwd=tcp:127.0.0.1:8001-:80 -daemonize
3636
pytest
37+
- name: Generate gcov report
38+
shell: bash
39+
run: |
40+
. $IDF_PATH/export.sh
41+
pip install gcovr
42+
xtensa-esp32-elf-gcov-tool merge-stream gcov_data.gcfn
43+
gcovr --gcov-executable xtensa-esp32-elf-gcov --html-details coverage.html
3744
- name: Upload artifact
3845
if: '!cancelled()'
3946
uses: actions/upload-artifact@v4
4047
with:
41-
name: serial_log
42-
path: serial_log.txt
48+
name: logs
49+
path: |
50+
serial_log.txt
51+
coverage*
4352
if-no-files-found: error

0 commit comments

Comments
 (0)