-
Notifications
You must be signed in to change notification settings - Fork 1
87 lines (72 loc) · 2.56 KB
/
quality.yml
File metadata and controls
87 lines (72 loc) · 2.56 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: AutoControl Code Quality
# Static analysis (ruff, bandit) plus the headless pytest suite added in
# rounds 22-30. Decoupled from the existing dev/stable workflows, which
# run legacy standalone test scripts and exist for hardware integration
# coverage on Windows runners.
on:
push:
branches: [ "dev", "main", "stable" ]
pull_request:
branches: [ "dev", "main", "stable" ]
workflow_dispatch:
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install ruff
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run ruff
run: ruff check je_auto_control/
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install bandit
run: |
python -m pip install --upgrade pip
pip install bandit
- name: Run bandit (recursive, skip tests + i18n dicts)
run: bandit -r je_auto_control/ -c pyproject.toml
pytest-headless:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ]
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"
- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
# Install the editable package FIRST so its source dir is the
# one Python sees on subsequent imports. We deliberately
# avoid `pip install -r dev_requirements.txt` here because
# that file pulls in `je_auto_control_dev` (a separate PyPI
# package), which ships its own snapshot of `je_auto_control/`
# straight into site-packages and masks the editable install
# for any sub-package the snapshot doesn't include
# (admin, usb, remote_desktop, vision, …).
pip install -e .
pip install ruff==0.15.9 bandit==1.9.4 pytest==9.0.2 pytest-timeout==2.4.0 pytest-rerunfailures==15.1 PySide6==6.11.0
- name: Run headless pytest suite
run: pytest test/unit_test/headless/ -v --tb=short --timeout=120