fix(ci): keep build and test reports accurate #118

Merged
forust merged 2 commits from fix/ci-test-output-isolation into main 2026-10-08 19:13:23 +00:00
Owner

Unit tests inherited CI command files and wrote fake commit SHAs and image digests to the real job summary. Image reports also accepted unverified digests into the completed list, labelled one image result as a complete release, and printed character counts instead of Compose service counts.

All unit tests now redirect GITHUB_STEP_SUMMARY, GITHUB_OUTPUT, GITHUB_ENV, GITHUB_PATH, and GITHUB_STATE to temporary files. Cleanup restores the environment and removes the private files. A child-process regression checks that the full unit suite leaves external CI files unchanged.

The image builder checks the digest type and SHA-256 syntax before adding the image to its completed results. Per-image summaries identify the image and source commit. They state that the final build job must publish the complete release. Invalid metadata cannot appear as a completed image digest.

Compose verification now reports the number of services. The shell regression success banner appears only after all checks pass.

Validation:

  • All 39 Python tests pass.
  • Shell regressions, Ruff, ShellCheck, and git diff --check pass.
  • New regressions fail with the previous image code and Compose counter.
  • All five external CI command files remain unchanged; cleanup restores environment values and removes test files.

Only test isolation, digest validation, and report wording/counts change. There are no image version changes or infrastructure deployments. PR image release jobs remain skipped; image failure and success reports are verified with isolated tests. Old reports retain their content.

Gitea CI run 1713 passed for commit 0e3035ed74a15e12c423839b707dccdf8ba8c404. All eight validation jobs passed. The rendered summary contains eight successful checks with the real SHA and no fake SHA, fake digest, test-generated image build section, or invalid test metadata. Image publication jobs are skipped for PRs; their report paths are covered by the isolated regression tests.

Unit tests inherited CI command files and wrote fake commit SHAs and image digests to the real job summary. Image reports also accepted unverified digests into the completed list, labelled one image result as a complete release, and printed character counts instead of Compose service counts. All unit tests now redirect `GITHUB_STEP_SUMMARY`, `GITHUB_OUTPUT`, `GITHUB_ENV`, `GITHUB_PATH`, and `GITHUB_STATE` to temporary files. Cleanup restores the environment and removes the private files. A child-process regression checks that the full unit suite leaves external CI files unchanged. The image builder checks the digest type and SHA-256 syntax before adding the image to its completed results. Per-image summaries identify the image and source commit. They state that the final build job must publish the complete release. Invalid metadata cannot appear as a completed image digest. Compose verification now reports the number of services. The shell regression success banner appears only after all checks pass. Validation: - All 39 Python tests pass. - Shell regressions, Ruff, ShellCheck, and `git diff --check` pass. - New regressions fail with the previous image code and Compose counter. - All five external CI command files remain unchanged; cleanup restores environment values and removes test files. Only test isolation, digest validation, and report wording/counts change. There are no image version changes or infrastructure deployments. PR image release jobs remain skipped; image failure and success reports are verified with isolated tests. Old reports retain their content. Gitea CI run [1713](https://git.forust.xyz/forust/homelab/actions/runs/1713) passed for commit `0e3035ed74a15e12c423839b707dccdf8ba8c404`. All eight validation jobs passed. The rendered summary contains eight successful checks with the real SHA and no fake SHA, fake digest, test-generated image build section, or invalid test metadata. Image publication jobs are skipped for PRs; their report paths are covered by the isolated regression tests.
forust added 1 commit 2026-10-08 18:20:55 +00:00
test: isolate CI summary and output files
ci / Formatting (pull_request) Successful in 24s
ci / Compose (pull_request) Successful in 16s
ci / Workflows (pull_request) Successful in 9s
ci / Shell (pull_request) Successful in 18s
ci / Python and tests (pull_request) Successful in 11s
ci / YAML (pull_request) Successful in 11s
ci / Dockerfiles (pull_request) Successful in 7s
ci / Kubernetes (pull_request) Successful in 8s
ci / image-plan (pull_request) Skipped
ci / Image (${{ matrix.name }}) (pull_request) Skipped
ci / build (pull_request) Skipped
1d8eda6e5e
forust added 1 commit 2026-10-08 18:46:49 +00:00
fix(ci): validate image digests and isolate test outputs
ci / Compose (pull_request) Successful in 12s
ci / Workflows (pull_request) Successful in 9s
ci / Shell (pull_request) Successful in 21s
ci / Formatting (pull_request) Successful in 22s
ci / Python and tests (pull_request) Successful in 10s
ci / YAML (pull_request) Successful in 11s
ci / Dockerfiles (pull_request) Successful in 6s
ci / Kubernetes (pull_request) Successful in 8s
ci / image-plan (pull_request) Skipped
ci / Image (${{ matrix.name }}) (pull_request) Skipped
ci / build (pull_request) Skipped
0e3035ed74
forust changed title from test: isolate CI summary and output files to fix(ci): keep build and test reports accurate 2026-10-08 18:47:14 +00:00
forust merged commit f00c044f3d into main 2026-10-08 19:13:23 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: forust/homelab#118