mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
- New `utils/github/playwright_summary.py` parses every `playwright-junit.xml` under a given artefact directory and prints a markdown table to stdout with one row per test case: App, Test, Status (🟢 passed / 🔴 failed / 🔵 skipped), Duration (sub-second precision), Message. Sub-second formatting keeps useful per-test signal that integer rounding would erase. Edge cases (missing dir, no junit files, all-unparseable) emit a friendly placeholder note instead of crashing. Covered by 26 unit tests in `tests/unit/utils/github/test_playwright_summary.py`. - `test-deploy-server.yml` runs the script with `if: always()` after the deploy step and pipes its output into `$GITHUB_STEP_SUMMARY`, so every matrix job's run page surfaces a per-app test table without needing to download artefacts. - Playwright config adds the `github` reporter so failing tests also emit inline `::error file=...,line=...::`-annotations directly on the workflow run page and in PR diffs. - New lint `tests/lint/filesystem/test_plugin_paths_files.py` enforces that files under the Ansible plugin source directories declared in `ansible.cfg` (`action_plugins`, `filter_plugins`, `lookup_plugins`, `library`, `module_utils`) are Python source files (README.md exempt). Paths are read live from `ansible.cfg` so a future config edit automatically extends the lint's coverage. Counterpart to the existing `test_scripts_folder_files.py` lint that enforces `scripts/` contains only `.sh`. Known limitation (pre-existing pipeline behaviour, not introduced by this change): when a role runs through multiple matrix variants, the container path `/var/lib/infinito/logs/test-e2e-playwright/<app_id>/` has no variant component, so each variant overwrites the previous variant's reports. The summary therefore reflects only the LAST variant per role. A future change to namespace the reports per variant (or copy them after each variant pass) will make the table cover every variant without touching the script or workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 lines
83 B
Python
4 lines
83 B
Python
from pathlib import Path
|
|
|
|
PROJECT_ROOT: Path = Path(__file__).resolve().parents[4]
|