Add e2e showcase tests - #52
Conversation
|
|
||
| ## How It Works | ||
|
|
||
| [../../single-source.yml](../../single-source.yml) points `code-path` directly |
There was a problem hiding this comment.
Not sure, but think that path from root will be better, and in name the name will be enough.
[single-source.yml](/showcase/configuration/single-source.yml)There was a problem hiding this comment.
Root paths didn't work, when clicking the link.
There was a problem hiding this comment.
Pull request overview
Adds a runnable “showcase” that doubles as end-to-end validation for embed-code-go by embedding curated fixtures into documentation examples (positive and negative), and wiring a dedicated test suite to execute the full check → embed → check flow.
Changes:
- Introduces an opt-in (
-tags showcase) Ginkgo/Gomega E2E test suite that runsembed-code-goviago runagainst temporary copies of the showcase docs. - Adds a new
showcase/documentation + fixture tree covering embedding features, configuration shapes, and intentional failure scenarios. - Links the showcase from top-level docs and runs the showcase suite in CI.
Reviewed changes
Copilot reviewed 50 out of 50 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| showcase/showcase_test.go | E2E Ginkgo suite running check/embed flows |
| showcase/README.md | Entry README for showcase + how to run |
| showcase/embedding/README.md | Index of embedding feature examples |
| showcase/embedding/positive/whole-file-source.md | Positive example: whole-file embedding |
| showcase/embedding/positive/start-end-pattern.md | Positive example: start/end patterns |
| showcase/embedding/positive/source-line-pattern.md | Positive example: line pattern |
| showcase/embedding/positive/pattern-escaping.md | Positive example: escaping glob syntax |
| showcase/embedding/positive/overlapping-fragments.md | Positive example: overlapping fragments |
| showcase/embedding/positive/named-source-root.md | Positive example: named source roots |
| showcase/embedding/positive/named-fragment.md | Positive example: named fragments |
| showcase/embedding/positive/multi-part-fragment-separator.md | Positive example: multi-part fragments + separator |
| showcase/embedding/positive/multi-line-pattern.md | Positive example: multi-line patterns (\n) |
| showcase/embedding/positive/markdown-fence-shielding.md | Positive example: inert instructions inside fences |
| showcase/embedding/positive/instruction-tag.md | Positive example: paired vs self-closing tags |
| showcase/embedding/positive/html-showcase.html | Positive example: HTML document processing |
| showcase/embedding/positive/comment-filtering.md | Positive example: comment filtering modes |
| showcase/embedding/negative/stale.yml | Negative config: stale snippet scenario |
| showcase/embedding/negative/processing-errors.yml | Negative config: processing error scenarios |
| showcase/embedding/negative/docs/unclosed-code-fence.md | Negative doc: unclosed fence |
| showcase/embedding/negative/docs/stale-snippet.md | Negative doc: intentionally stale snippet |
| showcase/embedding/negative/docs/missing-source.md | Negative doc: missing source file |
| showcase/embedding/negative/docs/missing-pattern.md | Negative doc: unmatched line pattern |
| showcase/embedding/negative/docs/missing-fragment.md | Negative doc: missing fragment |
| showcase/embedding/negative/docs/missing-code-fence.md | Negative doc: missing code fence |
| showcase/embedding/negative/docs/invalid-attributes.md | Negative doc: invalid attribute combination |
| showcase/embedding/embed-code.yml | Config for running positive embedding showcase |
| showcase/configuration/single-source.yml | Config example: single (unnamed) source root |
| showcase/configuration/README.md | Guide for YAML configuration patterns |
| showcase/configuration/named-sources.yml | Config example: named source roots |
| showcase/configuration/multiple-embeddings.yml | Config example: multiple embedding entries |
| showcase/configuration/include-exclude.yml | Config example: includes/excludes |
| showcase/configuration/docs/single-source/greeting.md | Docs for single-source config |
| showcase/configuration/docs/named-sources/text-line.md | Docs for named text source |
| showcase/configuration/docs/named-sources/kotlin-greeting.md | Docs for named Kotlin source |
| showcase/configuration/docs/named-sources/java-greeting.md | Docs for named Java source |
| showcase/configuration/docs/multiple/kotlin/greeting.md | Docs for multi-embedding Kotlin entry |
| showcase/configuration/docs/multiple/java/greeting.md | Docs for multi-embedding Java entry |
| showcase/configuration/docs/include-exclude/included.md | Docs for included file behavior |
| showcase/configuration/docs/include-exclude/excluded.md | Docs for excluded file behavior |
| showcase/code/text/glob-patterns.txt | Text fixture for pattern examples |
| showcase/code/kotlin/org/showcase/KotlinGreeting.kt | Kotlin fixture with fragment markers |
| showcase/code/java/org/showcase/PatternSamples.java | Java fixture for pattern/range examples |
| showcase/code/java/org/showcase/OverlappingFragments.java | Java fixture for overlapping fragments |
| showcase/code/java/org/showcase/MultiPartWorkflow.java | Java fixture for multi-part fragments |
| showcase/code/java/org/showcase/Greeting.java | Java fixture used across many examples |
| showcase/code/java/org/showcase/CommentModes.java | Java fixture for comment filtering |
| README.md | Links to showcase + minor doc fix |
| go.mod | Updates copyright header year |
| EMBEDDING.md | Links to showcase + minor doc/link formatting |
| .github/workflows/check.yml | Runs showcase tests in CI with build tag |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Oleg-Melnik
left a comment
There was a problem hiding this comment.
LGTM, with Copilot comments resolved before merging.
This PR adds showcase end-to-end tests.
Resolves this issue.