Files
hwmonDaemon/.gitea/workflows/test.yml
T
jaredandClaude Opus 4.8 d9de2dde82
Lint / Python (flake8) (push) Successful in 59s
Security / Python Security (bandit) (push) Successful in 48s
Test / Python Tests (pytest) (push) Successful in 2m29s
Lint / Notify on failure (push) Has been skipped
ci: fix pip install under PEP 668 (externally-managed-environment)
The Debian runner image marks its Python as externally managed, so
`pip3 install` fails with error: externally-managed-environment, breaking
the test/lint/security workflows at the install step (unrelated to the code
under test). Add --break-system-packages; the runner is ephemeral so a
system-wide install is fine.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 20:49:52 -04:00

25 lines
678 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
# Debian's Python is externally managed (PEP 668); the runner is ephemeral.
pip3 install --break-system-packages pytest-cov
- name: Run pytest with coverage
run: python3 -m pytest tests/ -v --cov=. --cov-report=term-missing --cov-config=.coveragerc