-
-
Notifications
You must be signed in to change notification settings - Fork 313
63 lines (52 loc) · 1.73 KB
/
Copy pathpython-app.yml
File metadata and controls
63 lines (52 loc) · 1.73 KB
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
56
57
58
59
60
61
62
name: DDT4ALL APP
on:
push:
pull_request:
branches: [ master ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.x"]
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
# Linux only: install xvfb
- name: Install system deps (Qt headless - Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb libbluetooth-dev bluetooth
- name: Install project (pyproject.toml + dev deps)
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev,can,network,bluetooth]" --no-warn-script-location
# Run tests on Linux with xvfb
- name: Run tests with coverage (Linux)
if: runner.os == 'Linux'
env:
QT_QPA_PLATFORM: offscreen
run: |
xvfb-run -a pytest --cov=ddt4all --cov-report=term-missing --cov-report=xml
# Run tests on macOS and Windows
- name: Run tests with coverage (macOS / Windows)
if: runner.os != 'Linux'
env:
QT_QPA_PLATFORM: offscreen
run: |
pytest --cov=ddt4all --cov-report=term-missing --cov-report=xml
# Optional: upload coverage
# - name: Upload coverage to Codecov
# if: ${{ !cancelled() }}
# uses: codecov/codecov-action@v4
# with:
# files: coverage.xml
# fail_ci_if_error: true
# token: ${{ secrets.CODECOV_TOKEN }}