Add pytest test suite and security scanning

- Add 33 tests for DiagnosticsRunner static methods (build_ssh_command,
  parse_output, parse_sysfs_stats, parse_ethtool and variants)
- Add test.yml CI workflow running pytest on every push/PR
- Add security.yml CI workflow running bandit on every push/PR (weekly)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-14 12:22:57 -04:00
co-authored by Claude Sonnet 4.6
parent 6880abdff3
commit 903dc960c3
2 changed files with 241 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
name: Test
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
pytest:
name: Python Tests (pytest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Python and dependencies
run: |
apt-get update -qq
apt-get install -y -qq python3 python3-pip
pip3 install pytest
pip3 install -r requirements.txt --quiet
- name: Run pytest
run: python3 -m pytest tests/ -v