Files
jared 78691e6235
Lint / Python (flake8) (push) Failing after 20s
Security / Python Security (bandit) (push) Successful in 25s
Test / Python Tests (pytest) (push) Successful in 57s
Lint / Notify on failure (push) Successful in 2s
ci: add notify-failure, pytest with coverage, and 49 unit tests
- lint.yml: add notify-failure Matrix alert job
- test.yml: new workflow running pytest with pytest-cov for coverage
- .coveragerc: omit tests and site-packages from coverage
- .gitignore: ignore __pycache__ and .pyc files
- tests/test_hwmon.py: 49 unit tests covering SystemHealthMonitor
  (temperature parsing, service monitoring, disk usage, metric collection,
  dry run behaviour); uses unittest.mock to isolate from env/filesystem

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 16:25:23 -04:00

24 lines
568 B
YAML

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 python3-pytest python3-psutil python3-requests
pip3 install pytest-cov
- name: Run pytest with coverage
run: python3 -m pytest tests/ -v --cov=. --cov-report=term-missing --cov-config=.coveragerc