@@ -23,18 +23,14 @@ jobs:
2323 timeout-minutes : 40
2424 runs-on : ubuntu-latest
2525 steps :
26- - uses : actions/checkout@v4
27- - uses : actions/setup-python@v5
26+ - uses : actions/checkout@v6
27+ - uses : actions/setup-python@v6
2828 with :
2929 python-version : " 3.14"
30- - name : Install dependencies
31- run : |
32- sudo apt update && sudo apt install -y libgcrypt20 libglib2.0-0 libpixman-1-0 libsdl2-2.0-0 libslirp0
33- pip install -U pip
34- export PIP_EXTRA_INDEX_URL="https://dl.espressif.com/pypi"
35- pip install cryptography --prefer-binary
36- pip install -r requirements.txt
37- bash foreach.sh install
30+ - name : Install apt dependencies
31+ run : sudo apt update && sudo apt install -y libgcrypt20 libglib2.0-0 libpixman-1-0 libsdl2-2.0-0 libslirp0 zip
32+ - name : Setup Python environment
33+ uses : ./.github/actions/setup-python-env
3834 - name : Download and install QEMU
3935 run : |
4036 wget https://github.com/espressif/qemu/releases/download/esp-develop-9.2.2-20250817/qemu-xtensa-softmmu-esp_develop_9.2.2_20250817-x86_64-linux-gnu.tar.xz
4339 tar -xf qemu-riscv32-softmmu-esp_develop_9.2.2_20250817-x86_64-linux-gnu.tar.xz
4440 echo "$PWD/qemu/bin" >> $GITHUB_PATH
4541 - name : Run QEMU tests
46- run : pytest pytest-embedded-qemu/tests/test_qemu.py
42+ run : |
43+ pytest pytest-embedded-qemu/tests/test_qemu.py \
44+ --junitxml pytest-qemu.xml \
45+ $PYTEST_COV_ARGS | tee pytest-coverage-qemu.txt
46+ - name : Upload test results
47+ uses : ./.github/actions/upload-test-results
48+ if : always()
49+ with :
50+ name : test-results-qemu
51+ - name : Zip log files
52+ if : failure()
53+ run : |
54+ zip -r logs.zip /tmp/pytest-embedded
55+ - uses : actions/upload-artifact@v6
56+ if : failure()
57+ with :
58+ name : logs-qemu
59+ path : logs.zip
4760
4861 test-python :
4962 timeout-minutes : 40
@@ -64,36 +77,30 @@ jobs:
6477 options : --privileged
6578 steps :
6679 - uses : actions/checkout@v6
67- - name : Install dependencies
68- run : |
69- apt update && apt install -y socat zip
70- pip install -U pip
71- export PIP_EXTRA_INDEX_URL="https://dl.espressif.com/pypi"
72- pip install cryptography --prefer-binary
73- pip install -r requirements.txt
74- bash foreach.sh install
80+ - name : Install apt dependencies
81+ run : apt update && apt install -y socat zip
82+ - name : Setup Python environment
83+ uses : ./.github/actions/setup-python-env
7584 - name : Check ports
7685 run : ls -la /dev/ttyUSB*
7786 - name : Run Tests with coverage
87+ env :
88+ COVERAGE_FILE : " .coverage.${{ matrix.python-version }}-${{ matrix.arch }}"
7889 run : |
7990 pytest \
80- --junitxml=pytest.xml \
81- --cov-report=term-missing \
82- --cov=pytest_embedded \
83- --cov=pytest_embedded_arduino \
84- --cov=pytest_embedded_idf \
85- --cov=pytest_embedded_jtag \
86- --cov=pytest_embedded_qemu \
87- --cov=pytest_embedded_serial \
88- --cov=pytest_embedded_serial_esp \
89- --cov=pytest_embedded_wokwi \
90- --cov=pytest_embedded_nuttx
91+ --junitxml=pytest-${{ matrix.python-version }}-${{ matrix.arch }}.xml \
92+ $PYTEST_COV_ARGS | tee pytest-coverage-${{ matrix.python-version }}-${{ matrix.arch }}.txt
93+ - name : Upload test results
94+ uses : ./.github/actions/upload-test-results
95+ if : always()
96+ with :
97+ name : test-results-${{ matrix.python-version }}-${{ matrix.arch }}
9198 - name : Zip log files
9299 if : failure()
93100 run : |
94101 zip -r logs.zip /tmp/pytest-embedded
95102 - uses : actions/upload-artifact@v6
96103 if : failure()
97104 with :
98- name : logs-${{ matrix.python-version }}
105+ name : logs-${{ matrix.python-version }}-${{ matrix.arch }}
99106 path : logs.zip
0 commit comments