Files
PLFM_RADAR/.github/workflows/ci-tests.yml
T
Jason 6a117dd324 fix: resolve ruff lint errors and add lint CI job
Remove unused imports (deque, sys, Opcode, struct, _REPLAY_ADJUSTABLE_OPCODES)
across 4 active Python files and refactor semicolons to separate statements
in radar_protocol.py. Add ruff lint job to CI workflow targeting only the
active files (excludes legacy GUI_V*.py and v7/).
2026-04-08 17:28:22 +03:00

100 lines
3.1 KiB
YAML

name: AERIS-10 CI
on:
pull_request:
branches: [main, develop]
push:
branches: [main, develop]
jobs:
# ===========================================================================
# Job 0: Ruff Lint (active Python files only)
# Excludes legacy GUI_V*.py files and untracked v7/ directory
# ===========================================================================
lint:
name: Ruff Lint (active files)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install ruff
run: pip install ruff
- name: Run ruff on active files
run: |
ruff check \
9_Firmware/9_3_GUI/radar_protocol.py \
9_Firmware/9_3_GUI/radar_dashboard.py \
9_Firmware/9_3_GUI/smoke_test.py \
9_Firmware/9_3_GUI/test_radar_dashboard.py
# ===========================================================================
# Job 1: Python Host Software Tests (58 tests)
# radar_protocol, radar_dashboard, FT2232H connection, replay, opcodes, e2e
# ===========================================================================
python-tests:
name: Python Dashboard Tests (58)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest numpy h5py
- name: Run test suite
run: python -m pytest 9_Firmware/9_3_GUI/test_radar_dashboard.py -v --tb=short
# ===========================================================================
# Job 2: MCU Firmware Unit Tests (20 tests)
# Bug regression (15) + Gap-3 safety tests (5)
# ===========================================================================
mcu-tests:
name: MCU Firmware Tests (20)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install build tools
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Build and run MCU tests
working-directory: 9_Firmware/9_1_Microcontroller/tests
run: make test
# ===========================================================================
# Job 3: FPGA RTL Regression (23 testbenches + lint)
# Phase 0: Vivado-style lint, Phase 1-4: unit + integration + e2e
# ===========================================================================
fpga-regression:
name: FPGA Regression (23 TBs + lint)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Icarus Verilog
run: sudo apt-get update && sudo apt-get install -y iverilog
- name: Run full FPGA regression
working-directory: 9_Firmware/9_2_FPGA
run: bash run_regression.sh