Merge pull request #389 from espressif/feat/support-log-metric #784
This file contains hidden or 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" | |
| - "*/pyproject.toml" | |
| - .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 | |
| env: | |
| WOKWI_CLI_TOKEN: ${{ secrets.WOKWI_CLI_TOKEN }} | |
| jobs: | |
| test-python: | |
| timeout-minutes: 40 | |
| strategy: | |
| matrix: | |
| include: | |
| - python-version: "3.10" | |
| arch: "ARM64" | |
| - 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@v5 | |
| - 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 \ | |
| --cov=pytest_embedded_wokwi | |
| - name: Zip log files | |
| if: failure() | |
| run: | | |
| zip -r logs.zip /tmp/pytest-embedded | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: logs-${{ matrix.python-version }} | |
| path: logs.zip |