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.
This commit is contained in:
torlando-tech 2025-10-29 12:01:20 -04:00
commit fb1cd50cd1

View file

@ -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