fix: add coverage configuration and test infrastructure for push and utils modules

Add coverage tooling to CI workflow, Makefile, and pyproject.toml dependencies.
Introduce new test suites for push notification helpers (base64 encoding, HKDF,
authorization JWT) and utility functions (safe_next, strip_html, mention extraction,
badge/xp awarding, milestone checks) with a session-scoped local_db fixture.
This commit is contained in:
2026-06-05 18:33:35 +00:00
parent f05b6a4faf
commit 1eeb789e9c
7 changed files with 153 additions and 4 deletions
+19 -2
View File
@@ -21,9 +21,26 @@ jobs:
pip install -e ".[dev]"
python -m playwright install chromium --with-deps
- name: Run integration tests
- name: Run integration tests with coverage
env:
COVERAGE_PROCESS_START: ${{ github.workspace }}/.coveragerc
PLAYWRIGHT_HEADLESS: "1"
run: |
python -m pytest tests/ -v --tb=line -x
python -m coverage run -m pytest tests/ -p no:xdist --tb=line
- name: Build coverage report
if: always()
run: |
python -m coverage combine
python -m coverage report
python -m coverage html
- name: Publish coverage HTML
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-html
path: htmlcov/
- name: Upload test screenshots
if: failure()