77 - " */pyproject.toml"
88 - .github/workflows/test-python.yml
99 - " !docs/**"
10- push :
11- branches : [main]
1210
1311# cancel jobs if new commit pushed
1412concurrency :
2321 timeout-minutes : 40
2422 runs-on : ubuntu-latest
2523 steps :
26- - uses : actions/checkout@v4
27- - uses : actions/setup-python@v5
24+ - uses : actions/checkout@v6
25+ - uses : actions/setup-python@v6
2826 with :
2927 python-version : " 3.14"
3028 - name : Install dependencies
4240 tar -xf qemu-xtensa-softmmu-esp_develop_9.2.2_20250817-x86_64-linux-gnu.tar.xz
4341 tar -xf qemu-riscv32-softmmu-esp_develop_9.2.2_20250817-x86_64-linux-gnu.tar.xz
4442 echo "$PWD/qemu/bin" >> $GITHUB_PATH
43+
44+ - name : Save PR number
45+ run : echo ${{ github.event.number }} > pr_number.txt
46+
4547 - name : Run QEMU tests
46- run : pytest pytest-embedded-qemu/tests/test_qemu.py
48+ run : |
49+ pytest pytest-embedded-qemu/tests/test_qemu.py \
50+ --junitxml pytest-qemu.xml \
51+ --cov-report=xml:coverage-qemu.xml \
52+ --cov=pytest_embedded \
53+ --cov=pytest_embedded_arduino \
54+ --cov=pytest_embedded_idf \
55+ --cov=pytest_embedded_jtag \
56+ --cov=pytest_embedded_qemu \
57+ --cov=pytest_embedded_serial \
58+ --cov=pytest_embedded_serial_esp \
59+ --cov=pytest_embedded_wokwi \
60+ --cov=pytest_embedded_nuttx
61+ - name : Upload test results
62+ uses : actions/upload-artifact@v6
63+ if : always()
64+ with :
65+ name : test-results-qemu
66+ path : |
67+ pr_number.txt
68+ pytest-qemu.xml
69+ coverage-qemu.xml
4770
4871 test-python :
4972 timeout-minutes : 40
@@ -74,11 +97,12 @@ jobs:
7497 bash foreach.sh install
7598 - name : Check ports
7699 run : ls -la /dev/ttyUSB*
100+
77101 - name : Run Tests with coverage
78102 run : |
79103 pytest \
80- --junitxml=pytest.xml \
81- --cov-report=term-missing \
104+ --junitxml=pytest-${{ matrix.python-version }}-${{ matrix.arch }} .xml \
105+ --cov-report=xml:coverage-${{ matrix.python-version }}-${{ matrix.arch }}.xml \
82106 --cov=pytest_embedded \
83107 --cov=pytest_embedded_arduino \
84108 --cov=pytest_embedded_idf \
@@ -88,12 +112,11 @@ jobs:
88112 --cov=pytest_embedded_serial_esp \
89113 --cov=pytest_embedded_wokwi \
90114 --cov=pytest_embedded_nuttx
91- - name : Zip log files
92- if : failure()
93- run : |
94- zip -r logs.zip /tmp/pytest-embedded
95- - uses : actions/upload-artifact@v6
96- if : failure()
115+ - name : Upload test results
116+ uses : actions/upload-artifact@v6
117+ if : always()
97118 with :
98- name : logs-${{ matrix.python-version }}
99- path : logs.zip
119+ name : test-results-${{ matrix.python-version }}-${{ matrix.arch }}
120+ path : |
121+ pytest-${{ matrix.python-version }}-${{ matrix.arch }}.xml
122+ coverage-${{ matrix.python-version }}-${{ matrix.arch }}.xml
0 commit comments