feat(ci): GitHub Actions annotations, step summary, and full docs#3
Merged
Conversation
- Track per-assertion source line via yaml.Node walk in discovery - Add SourceFile / SourceLine on Spec, SpecResult, AssertionResult - New services/fmt_ghactions.go emits ::error file=...,line=...:: lines - Add --github-annotations flag (auto-on when GITHUB_ACTIONS=true) - Reusable workflow writes EMD output to $GITHUB_STEP_SUMMARY - Reusable workflow passes --github-annotations to validate - Integration tests for failing-assertion and passing-suite cases
- Add docs/index.md as docs landing page with cross-links - Add docs/comparison.md vs helm-unittest, ct, conftest, kyverno, datree, kubeconform - Add docs/recipes.md cookbook (multi-env, security, image pinning, labels, HPA/PDB, etc.) - Add docs/troubleshooting.md for common authoring/runtime errors - Add examples/README.md describing each example and run command - Add CONTRIBUTING.md (dev setup, layer conventions, release flow) - Add CHANGELOG.md (Keep a Changelog format) bootstrapped with 0.1.0 - README: badges, sample output block, field-path quick-ref - README: cross-links to docs and examples - README: honest install instructions (no tagged release yet) - Back-link spec-format.md and reusable-workflow.md to docs index
There was a problem hiding this comment.
Core Changes
- Implemented GitHub Actions annotations for failing assertions, allowing inline error reporting in PR diffs.
- Added
SourceLinetracking to assertions by parsing the YAML node tree during discovery. - Enhanced CI workflow to output test results to the GitHub Step Summary.
- Added comprehensive documentation for users and contributors.
Concerns (if any)
- The
annotateSourceLinesfunction usesyaml.Nodeparsing which is robust, but ensure that theSourceLinemapping remains accurate if the YAML structure is heavily modified by pre-run commands (though currently, it maps against the originalspec.yaml).
Verdict
- Approve: The changes are well-implemented, follow the project's design constraints, and significantly improve the developer experience in CI.
Code review performed by GEMINI - gemini-3.1-flash-lite-preview.
- Add docs/demo.gif (146KB, ~28s) showing spec, manifest, passing run, broken run - Keep docs/demo.cast for future re-renders - Embed GIF below README intro paragraph - Allowlist *.gif and *.cast in structlint
There was a problem hiding this comment.
Core Changes
- Implemented GitHub Actions annotations for failing assertions, allowing inline error reporting in PR diffs.
- Added step summary support to display test results directly on the workflow run page.
- Enhanced spec discovery to track source file paths and line numbers for assertions.
- Added comprehensive documentation for users and contributors.
Concerns (if any)
- The
annotateSourceLinesfunction usesyaml.Nodeto track line numbers. While this is robust, it adds complexity to the discovery service. Ensure that future changes to the YAML structure don't break the node traversal logic.
Verdict
- Approve: The changes are well-implemented, include necessary E2E tests, and follow the project's architectural constraints.
Code review performed by GEMINI - gemini-3.1-flash-lite-preview.
There was a problem hiding this comment.
Core Changes
- Implemented GitHub Actions annotations for failing assertions, allowing inline error reporting in PR diffs.
- Added step summary support to display test results directly on the workflow run page.
- Enhanced spec discovery to track source file paths and assertion line numbers.
- Added comprehensive documentation for users and contributors.
Concerns (if any)
- The
annotateSourceLinesfunction usesyaml.Nodetraversal which is robust but adds complexity to the discovery service. The implementation is marked as best-effort, which is appropriate.
Verdict
- Approve: The changes are well-structured, include necessary E2E tests, and follow the project's design principles.
Code review performed by GEMINI - gemini-3.1-flash-lite-preview.
- Remove docs/comparison.md - Drop references from README, docs/index.md, CHANGELOG.md
There was a problem hiding this comment.
Core Changes
- Implemented GitHub Actions annotations for failing assertions, allowing inline error reporting in PR diffs.
- Added step summary support to display test results directly on the workflow run page.
- Enhanced spec discovery to track source file paths and assertion line numbers.
- Added comprehensive documentation for users and contributors.
Concerns (if any)
- None. The changes are additive and follow the project's existing patterns.
Verdict
- Approve: The changes are well-implemented, include necessary E2E tests, and follow the project's architectural constraints.
Code review performed by GEMINI - gemini-3.1-flash-lite-preview.
There was a problem hiding this comment.
Core Changes
- Implemented GitHub Actions annotations for failing assertions, allowing inline error reporting in PR diffs.
- Added step summary support to display test results directly on the workflow run page.
- Enhanced spec discovery to track source file paths and assertion line numbers.
- Added comprehensive documentation for users and contributors.
Concerns (if any)
- None. The changes are additive and follow the project's existing patterns.
Verdict
- Approve: The changes are well-implemented, include necessary E2E tests, and follow the project's architectural constraints.
Code review performed by GEMINI - gemini-3.1-flash-lite-preview.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Code changes
services/fmt_ghactions.go— new formatter emitting::error file=...,line=...::workflow commandsservices/discovery.go— walkyaml.Nodetree to capture per-assertion source linedomain/{models,results,config}.go— threadSourceFile/SourceLinethrough, both omitempty in JSON/YAMLflags.go+actions/validate.go+main.go— wire up--github-annotations(auto-on whenGITHUB_ACTIONS=true).github/workflows/reusable.yml— write EMD to$GITHUB_STEP_SUMMARY, pass--github-annotationsintegration/validate_test.go— 2 new E2E tests (failing assertions emit annotations, passing suite emits none)Docs changes
docs/index.md— landing page with cross-linksdocs/comparison.md— vs helm-unittest, chart-testing, conftest, kyverno, datree, kubeconformdocs/recipes.md— cookbook (multi-env, security, image pinning, labels, HPA/PDB, NetworkPolicy)docs/troubleshooting.md— common authoring and runtime errorsexamples/README.md— what each example shows + run commandCONTRIBUTING.md— dev setup, layer conventions, release flowCHANGELOG.md— Keep a Changelog format, bootstrapped with 0.1.0README.md— badges, sample output, field-path quick-ref, cross-links, honest install instructionsTest plan
go test ./...— 120 passed (118 existing + 2 new)go vet ./...— cleangofmt -l .— cleangolangci-lint run— 0 issues (via lefthook pre-commit)