Merge pull request #322 from fdcavalcanti/feature/nuttx-and-qemu-support #561
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Python Packages | |
on: | |
pull_request: | |
paths: | |
- '**.py' | |
- .github/workflows/test-python.yml | |
- '!docs/**' | |
push: | |
branches: [ main ] | |
# cancel jobs if new commit pushed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-python: | |
timeout-minutes: 40 | |
strategy: | |
matrix: | |
include: | |
- python-version: '3.7' | |
arch: 'ARM' | |
- python-version: '3.13' | |
arch: 'X64' | |
fail-fast: false | |
runs-on: | |
- self-hosted | |
- multiboard | |
- ${{ matrix.arch }} | |
container: | |
image: python:${{ matrix.python-version }} | |
options: --privileged | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apt update && apt install -y socat zip | |
pip install -U pip | |
export PIP_EXTRA_INDEX_URL="https://dl.espressif.com/pypi" | |
pip install cryptography --prefer-binary | |
pip install -r requirements.txt | |
bash foreach.sh install | |
- name: Check ports | |
run: ls -la /dev/ttyUSB* | |
- name: Run Tests with coverage | |
run: | | |
pytest \ | |
--junitxml=pytest.xml \ | |
--cov-report=term-missing \ | |
--cov=pytest_embedded \ | |
--cov=pytest_embedded_arduino \ | |
--cov=pytest_embedded_idf \ | |
--cov=pytest_embedded_jtag \ | |
--cov=pytest_embedded_qemu \ | |
--cov=pytest_embedded_serial \ | |
--cov=pytest_embedded_serial_esp | |
- name: Zip log files | |
if: failure() | |
run: | | |
zip -r logs.zip /tmp/pytest-embedded | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: logs | |
path: logs.zip |