-
Notifications
You must be signed in to change notification settings - Fork 27
55 lines (53 loc) · 1.47 KB
/
test-python.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Test Python Packages
on:
pull_request:
paths:
- '**.py'
push:
branches: [ main ]
jobs:
test-python:
timeout-minutes: 30
runs-on:
- self-hosted
- multiboard
strategy:
matrix:
python-version: ['3.7', '3.11']
fail-fast: false
container:
image: python:${{ matrix.python-version }}-bullseye
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 --only-binary :all:
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@v3
if: failure()
with:
name: logs
path: logs.zip