From 7ab5d53352df51de97e84a8fcc6db95acaffe714 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 10:34:39 -0400 Subject: [PATCH 1/8] ci: add Raspberry Pi OS ARM testing (32-bit and 64-bit) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add QEMU-based ARM testing for both armhf (32-bit) and arm64 (64-bit) architectures to validate installer on Raspberry Pi OS Lite. Tests run only on PRs to main branch to conserve CI resources while ensuring compatibility with ARM platforms before merge. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test.yml | 60 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e48b4b6..cf89da9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -164,3 +164,63 @@ jobs: echo "✓ Pip packages: bleak, bluezero" >> $GITHUB_STEP_SUMMARY echo "✓ Install method: System packages (no compilation)" >> $GITHUB_STEP_SUMMARY echo "✓ Installation time: < 1 minute" >> $GITHUB_STEP_SUMMARY + + installer-test-arm: + name: Installer Test (Raspberry Pi OS - ARM) + runs-on: ubuntu-latest + # Only run on pull requests to main branch + if: github.event_name == 'pull_request' && github.base_ref == 'main' + timeout-minutes: 20 # ARM emulation is slower, allow extra time + + strategy: + fail-fast: false + matrix: + include: + # Raspberry Pi OS 32-bit (armhf/armv7) + # Based on Debian Bookworm - matches Raspberry Pi OS Lite 32-bit + - os-image: "arm32v7/debian:bookworm" + platform: "linux/arm/v7" + arch-name: "Raspberry Pi OS 32-bit (armhf)" + + # Raspberry Pi OS 64-bit (arm64/aarch64) + # Based on Debian Bookworm - matches Raspberry Pi OS Lite 64-bit + - os-image: "arm64v8/debian:bookworm" + platform: "linux/arm64" + arch-name: "Raspberry Pi OS 64-bit (arm64)" + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + with: + platforms: arm,arm64 + + - name: Run installer test on ${{ matrix.arch-name }} + run: | + docker run --rm \ + --platform ${{ matrix.platform }} \ + -v $PWD:/workspace \ + -w /workspace \ + -e DEBIAN_FRONTEND=noninteractive \ + -e DEBCONF_NONINTERACTIVE_SEEN=true \ + -e TZ=UTC \ + ${{ matrix.os-image }} \ + bash tests/test_installer.sh + continue-on-error: false + + - name: Installation summary + if: always() + run: | + echo "## ARM Installer Test Results" >> $GITHUB_STEP_SUMMARY + echo "**Architecture:** ${{ matrix.arch-name }}" >> $GITHUB_STEP_SUMMARY + echo "**Platform:** ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY + echo "**Base Image:** ${{ matrix.os-image }}" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez" >> $GITHUB_STEP_SUMMARY + echo "✓ Pip packages: bleak==1.1.1, bluezero" >> $GITHUB_STEP_SUMMARY + echo "✓ BLE interface files copied" >> $GITHUB_STEP_SUMMARY + echo "✓ BlueZ experimental mode configured" >> $GITHUB_STEP_SUMMARY + echo "" >> $GITHUB_STEP_SUMMARY + echo "_Note: Tests run via QEMU emulation (2-5x slower than native)_" >> $GITHUB_STEP_SUMMARY From 2a1ab3fe27dfbd53ee1a04d3b4b1ef04f5c699bb Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 10:42:16 -0400 Subject: [PATCH 2/8] fix: add libffi-dev dependency for ARM cffi compilation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add libffi-dev to system dependencies for Debian/Ubuntu/Raspberry Pi OS to provide FFI headers needed when cffi compiles from source on ARM platforms. This fixes ARM 32-bit and 64-bit installation failures. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- install.sh | 6 +++--- tests/test_installer.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 73f94b6..afd7e3d 100755 --- a/install.sh +++ b/install.sh @@ -266,14 +266,14 @@ print_header "Installing System Dependencies" if command -v apt-get &> /dev/null; then # Debian/Ubuntu/Raspberry Pi OS print_info "Detected Debian/Ubuntu-based system" - echo "Installing: python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin" + echo "Installing: python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev" # Use sudo only if not running as root if [ "$EUID" -eq 0 ]; then apt-get update - apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin + apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev else sudo apt-get update - sudo apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin + sudo apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev fi print_success "System dependencies installed (using pre-compiled system packages)" elif command -v pacman &> /dev/null; then diff --git a/tests/test_installer.sh b/tests/test_installer.sh index a361145..4030a48 100755 --- a/tests/test_installer.sh +++ b/tests/test_installer.sh @@ -205,7 +205,7 @@ echo "Installation summary:" echo " • install.sh is fully self-contained (handles all prerequisites)" echo " • Reticulum Network Stack: installed via pip" if [ "$OS_TYPE" = "debian" ]; then - echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez" + echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" echo " • Pip packages: rns, bleak, bluezero" echo " • Install method: System packages (no compilation)" echo " • Installation time: < 1 minute" From 9aeee07e69e402a7d054e380ac9cc22050f8fd7b Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 11:02:51 -0400 Subject: [PATCH 3/8] refactor: make libffi-dev conditional for armhf (32-bit ARM) only MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only install libffi-dev on armhf (32-bit ARM) systems where cffi needs to compile from source. x86_64 and arm64 have pre-built cffi wheels available, so they don't need the development headers. Changes: - install.sh: Detect architecture and conditionally add libffi-dev for armhf - test_installer.sh: Show libffi-dev in output only for armhf systems - test.yml: Update ARM CI summary to reflect conditional dependency This reduces unnecessary dependencies on x86_64 and arm64 systems while maintaining full compatibility with 32-bit Raspberry Pi devices. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test.yml | 7 ++++++- install.sh | 20 +++++++++++++++++--- tests/test_installer.sh | 9 ++++++++- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cf89da9..78a08bd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -218,7 +218,12 @@ jobs: echo "**Platform:** ${{ matrix.platform }}" >> $GITHUB_STEP_SUMMARY echo "**Base Image:** ${{ matrix.os-image }}" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez" >> $GITHUB_STEP_SUMMARY + if [[ "${{ matrix.platform }}" == "linux/arm/v7" ]]; then + echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" >> $GITHUB_STEP_SUMMARY + echo "✓ libffi-dev included for 32-bit ARM cffi compilation" >> $GITHUB_STEP_SUMMARY + else + echo "✓ System packages: python3-gi, python3-dbus, python3-cairo, bluez" >> $GITHUB_STEP_SUMMARY + fi echo "✓ Pip packages: bleak==1.1.1, bluezero" >> $GITHUB_STEP_SUMMARY echo "✓ BLE interface files copied" >> $GITHUB_STEP_SUMMARY echo "✓ BlueZ experimental mode configured" >> $GITHUB_STEP_SUMMARY diff --git a/install.sh b/install.sh index afd7e3d..6616468 100755 --- a/install.sh +++ b/install.sh @@ -266,14 +266,28 @@ print_header "Installing System Dependencies" if command -v apt-get &> /dev/null; then # Debian/Ubuntu/Raspberry Pi OS print_info "Detected Debian/Ubuntu-based system" - echo "Installing: python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev" + + # Detect architecture for platform-specific dependencies + ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") + PACKAGES="python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin" + + # Add libffi-dev only for 32-bit ARM (armhf) - needed for cffi compilation + # x86_64 and arm64 have pre-built cffi wheels available + if [[ "$ARCH" == "armhf" ]]; then + PACKAGES="$PACKAGES libffi-dev" + echo "Installing: $PACKAGES" + print_info "Note: Including libffi-dev for 32-bit ARM cffi compilation" + else + echo "Installing: $PACKAGES" + fi + # Use sudo only if not running as root if [ "$EUID" -eq 0 ]; then apt-get update - apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev + apt-get install -y $PACKAGES else sudo apt-get update - sudo apt-get install -y python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin libffi-dev + sudo apt-get install -y $PACKAGES fi print_success "System dependencies installed (using pre-compiled system packages)" elif command -v pacman &> /dev/null; then diff --git a/tests/test_installer.sh b/tests/test_installer.sh index 4030a48..5e5916e 100755 --- a/tests/test_installer.sh +++ b/tests/test_installer.sh @@ -205,7 +205,14 @@ echo "Installation summary:" echo " • install.sh is fully self-contained (handles all prerequisites)" echo " • Reticulum Network Stack: installed via pip" if [ "$OS_TYPE" = "debian" ]; then - echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" + # Detect architecture for platform-specific package list + ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") + if [[ "$ARCH" == "armhf" ]]; then + echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez, libffi-dev" + echo " • Note: libffi-dev included for 32-bit ARM cffi compilation" + else + echo " • System packages: python3, python3-pip, git, python3-gi, python3-dbus, python3-cairo, bluez" + fi echo " • Pip packages: rns, bleak, bluezero" echo " • Install method: System packages (no compilation)" echo " • Installation time: < 1 minute" From c6b62e9e30bd491b8bb805d6808dbd73f88d677b Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 11:22:54 -0400 Subject: [PATCH 4/8] debug: add architecture detection logging for armhf troubleshooting MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add debug output to show: - Detected architecture value from dpkg - Whether armhf condition is matched - Final package list being installed This will help diagnose why libffi-dev isn't being installed on armhf systems in the CI environment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/install.sh b/install.sh index 6616468..4414acf 100755 --- a/install.sh +++ b/install.sh @@ -269,18 +269,19 @@ if command -v apt-get &> /dev/null; then # Detect architecture for platform-specific dependencies ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") + print_info "Detected architecture: $ARCH" + PACKAGES="python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin" # Add libffi-dev only for 32-bit ARM (armhf) - needed for cffi compilation # x86_64 and arm64 have pre-built cffi wheels available if [[ "$ARCH" == "armhf" ]]; then PACKAGES="$PACKAGES libffi-dev" - echo "Installing: $PACKAGES" - print_info "Note: Including libffi-dev for 32-bit ARM cffi compilation" - else - echo "Installing: $PACKAGES" + print_info "32-bit ARM detected - adding libffi-dev for cffi compilation" fi + echo "Installing: $PACKAGES" + # Use sudo only if not running as root if [ "$EUID" -eq 0 ]; then apt-get update From 5f1a8bf84d6863ac1dbb67a7bbc221b613c756ae Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 11:37:08 -0400 Subject: [PATCH 5/8] fix: install system dependencies before Reticulum to provide libffi-dev MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move system dependencies installation (Step 1) before Reticulum installation (Step 2) to ensure libffi-dev is available when RNS installs its dependency cryptography, which requires cffi compilation on armhf (32-bit ARM). Root cause: RNS dependency chain (RNS -> cryptography -> cffi) triggered cffi source compilation during pip install rns, before libffi-dev was installed in the old Step 2. New order: 1. Basic prerequisites (python3, pip, git) 2. System dependencies (including conditional libffi-dev for armhf) 3. Reticulum installation 4. Python dependencies (bleak, bluezero) The libffi-dev package remains conditional for armhf only - x86_64 and arm64 have pre-built cffi wheels and don't need compilation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- install.sh | 122 ++++++++++++++++++++++++++--------------------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/install.sh b/install.sh index 4414acf..f9cdbca 100755 --- a/install.sh +++ b/install.sh @@ -158,7 +158,67 @@ fi echo -# Step 1: Check for Reticulum installation +# Step 1: Install system dependencies +print_header "Installing System Dependencies" + +if command -v apt-get &> /dev/null; then + # Debian/Ubuntu/Raspberry Pi OS + print_info "Detected Debian/Ubuntu-based system" + + # Detect architecture for platform-specific dependencies + ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") + print_info "Detected architecture: $ARCH" + + PACKAGES="python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin" + + # Add libffi-dev only for 32-bit ARM (armhf) - needed for cffi compilation + # x86_64 and arm64 have pre-built cffi wheels available + if [[ "$ARCH" == "armhf" ]]; then + PACKAGES="$PACKAGES libffi-dev" + print_info "32-bit ARM detected - adding libffi-dev for cffi compilation" + fi + + echo "Installing: $PACKAGES" + + # Use sudo only if not running as root + if [ "$EUID" -eq 0 ]; then + apt-get update + apt-get install -y $PACKAGES + else + sudo apt-get update + sudo apt-get install -y $PACKAGES + fi + print_success "System dependencies installed (using pre-compiled system packages)" +elif command -v pacman &> /dev/null; then + # Arch Linux + print_info "Detected Arch Linux" + echo "Installing: base-devel gobject-introspection python-pip python-dbus python-cairo bluez bluez-utils libcap" + print_warning "Note: PyGObject will be compiled from pip due to version requirements (bluezero needs <3.52.0, Arch has 3.54.5)" + # Use sudo only if not running as root + if [ "$EUID" -eq 0 ]; then + # Sync package database first (may have been synced in basic prereqs, but ensure it's current) + pacman -Sy --noconfirm + # Skip python-gobject to avoid version conflict - pip will compile PyGObject + # gobject-introspection provides dev files needed for PyGObject compilation + pacman -S --needed --noconfirm base-devel gobject-introspection python-pip python-dbus python-cairo bluez bluez-utils libcap + else + sudo pacman -Sy --noconfirm + sudo pacman -S --needed --noconfirm base-devel gobject-introspection python-pip python-dbus python-cairo bluez bluez-utils libcap + fi + print_success "System dependencies installed (PyGObject will be compiled from pip)" +else + print_warning "Could not detect package manager" + print_info "Please manually install: BlueZ 5.x, python3-dbus" + read -p "Continue anyway? (y/N) " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Yy]$ ]]; then + exit 1 + fi +fi + +echo + +# Step 2: Check for Reticulum installation print_header "Checking for Reticulum" RNS_VENV="" @@ -260,66 +320,6 @@ fi echo -# Step 2: Install system dependencies -print_header "Installing System Dependencies" - -if command -v apt-get &> /dev/null; then - # Debian/Ubuntu/Raspberry Pi OS - print_info "Detected Debian/Ubuntu-based system" - - # Detect architecture for platform-specific dependencies - ARCH=$(dpkg --print-architecture 2>/dev/null || echo "unknown") - print_info "Detected architecture: $ARCH" - - PACKAGES="python3-pip python3-gi python3-dbus python3-cairo bluez libcap2-bin" - - # Add libffi-dev only for 32-bit ARM (armhf) - needed for cffi compilation - # x86_64 and arm64 have pre-built cffi wheels available - if [[ "$ARCH" == "armhf" ]]; then - PACKAGES="$PACKAGES libffi-dev" - print_info "32-bit ARM detected - adding libffi-dev for cffi compilation" - fi - - echo "Installing: $PACKAGES" - - # Use sudo only if not running as root - if [ "$EUID" -eq 0 ]; then - apt-get update - apt-get install -y $PACKAGES - else - sudo apt-get update - sudo apt-get install -y $PACKAGES - fi - print_success "System dependencies installed (using pre-compiled system packages)" -elif command -v pacman &> /dev/null; then - # Arch Linux - print_info "Detected Arch Linux" - echo "Installing: base-devel gobject-introspection python-pip python-dbus python-cairo bluez bluez-utils libcap" - print_warning "Note: PyGObject will be compiled from pip due to version requirements (bluezero needs <3.52.0, Arch has 3.54.5)" - # Use sudo only if not running as root - if [ "$EUID" -eq 0 ]; then - # Sync package database first (may have been synced in basic prereqs, but ensure it's current) - pacman -Sy --noconfirm - # Skip python-gobject to avoid version conflict - pip will compile PyGObject - # gobject-introspection provides dev files needed for PyGObject compilation - pacman -S --needed --noconfirm base-devel gobject-introspection python-pip python-dbus python-cairo bluez bluez-utils libcap - else - sudo pacman -Sy --noconfirm - sudo pacman -S --needed --noconfirm base-devel gobject-introspection python-pip python-dbus python-cairo bluez bluez-utils libcap - fi - print_success "System dependencies installed (PyGObject will be compiled from pip)" -else - print_warning "Could not detect package manager" - print_info "Please manually install: BlueZ 5.x, python3-dbus" - read -p "Continue anyway? (y/N) " -n 1 -r - echo - if [[ ! $REPLY =~ ^[Yy]$ ]]; then - exit 1 - fi -fi - -echo - # Step 3: Install Python dependencies print_header "Installing Python Dependencies" From fc3f5a544e958a89d617ab66aaa7c15d4d4e2fea Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 11:56:05 -0400 Subject: [PATCH 6/8] ci: re-enable unit and integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All installer test failures have been resolved. Re-enabling the full test suite now that the install.sh script works correctly in Docker containers. Installer tests are now passing on all platforms: - debian:12 ✓ - debian:trixie ✓ - ubuntu:22.04 ✓ - ubuntu:24.04 ✓ - archlinux:latest ✓ --- .github/workflows/test.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 78a08bd..e98bf3b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,7 +10,6 @@ jobs: unit-tests: name: Unit Tests runs-on: ubuntu-latest - if: false # Temporarily disabled to save CI minutes while troubleshooting installer tests strategy: matrix: @@ -62,7 +61,6 @@ jobs: integration-tests: name: Integration Tests runs-on: ubuntu-latest - if: false # Temporarily disabled to save CI minutes while troubleshooting installer tests strategy: matrix: From 9c0b656c4044974b62c8389be321d395f5f773bd Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 12:00:41 -0400 Subject: [PATCH 7/8] ci: add path filters to skip tests on docs-only changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add path-based triggers to workflow to run tests only when relevant files change. This saves CI resources on documentation-only or README changes while maintaining broad coverage for code and configuration changes. Tests now run when these files change: - install.sh (installer script) - src/** (all source code) - tests/** (test files) - .github/workflows/** (CI configuration) - *.txt, *.toml, *.cfg (dependency/config files) - *.py (Python files in root) Tests skip when only these change: - README.md, docs, examples - Other markdown or documentation files This is especially beneficial for ARM tests which take 5-10 minutes due to QEMU emulation overhead. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .github/workflows/test.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e98bf3b..d7a4b24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,13 +3,57 @@ name: Tests on: push: branches: [ "*" ] + paths: + - 'install.sh' + - 'src/**' + - 'tests/**' + - '.github/workflows/**' + - '*.txt' # requirements files + - '*.toml' # pyproject.toml + - '*.cfg' # setup.cfg + - '*.py' # any Python file in root pull_request: branches: [ "*" ] + paths: + - 'install.sh' + - 'src/**' + - 'tests/**' + - '.github/workflows/**' + - '*.txt' # requirements files + - '*.toml' # pyproject.toml + - '*.cfg' # setup.cfg + - '*.py' # any Python file in root jobs: + # Detect which files changed to run only relevant tests + detect-changes: + name: Detect Changes + runs-on: ubuntu-latest + outputs: + python: ${{ steps.filter.outputs.python }} + installer: ${{ steps.filter.outputs.installer }} + steps: + - uses: actions/checkout@v4 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + python: + - 'src/**/*.py' + - 'tests/test_*.py' + - '*.txt' + - '*.toml' + - '*.cfg' + installer: + - 'install.sh' + - 'tests/test_installer.sh' + - '.github/workflows/test.yml' + unit-tests: name: Unit Tests runs-on: ubuntu-latest + needs: detect-changes + if: needs.detect-changes.outputs.python == 'true' strategy: matrix: From fb1cd50cd17bb3fb63e6cbc8c7220024be04c740 Mon Sep 17 00:00:00 2001 From: torlando-tech Date: Wed, 29 Oct 2025 12:01:20 -0400 Subject: [PATCH 8/8] ci: make tests conditional based on changed files Add intelligent test selection to save CI minutes: - Added 'detect-changes' job using paths-filter to determine what changed - Unit/integration tests only run when Python source files change - Installer tests only run when install.sh or test_installer.sh changes This prevents running unnecessary tests: - Changing install.sh won't trigger Python unit/integration tests - Changing Python source won't trigger all 5 installer tests - Workflow changes trigger installer tests (to verify CI changes) Saves approximately 3-4 minutes of CI time per push when only one category of files is changed. --- .github/workflows/test.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7a4b24..0768265 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -105,6 +105,8 @@ jobs: integration-tests: name: Integration Tests runs-on: ubuntu-latest + needs: detect-changes + if: needs.detect-changes.outputs.python == 'true' strategy: matrix: @@ -165,6 +167,8 @@ jobs: installer-test: name: Installer Test (Fresh System) runs-on: ubuntu-latest + needs: detect-changes + if: needs.detect-changes.outputs.installer == 'true' strategy: fail-fast: false