Commit 3d258b2
committed
test(@angular/cli): add CI validation for MCP example code
This commit introduces a new CI check to validate the correctness of code snippets and markdown structure within the `find_examples` markdown files.
To support this, the previous `validate_examples.js` and `example_db_generator.js` scripts have been refactored and consolidated into a single, unified, mode-driven script: `process_examples.mjs`. This improves maintainability and ensures consistent parsing and validation logic.
The new script provides two new validation modes for CI:
- `validate-structure`: Parses all examples to validate their front matter and ensure they adhere to the required markdown heading structure.
- `validate-code`: Uses a pre-built Angular application harness to perform a full `ng build` on all example code, ensuring compilation and template correctness.
This provides a strong guarantee of the quality and reliability of the code and structure of all examples served by the `find_examples` tool.1 parent ff54b98 commit 3d258b2
7 files changed
Lines changed: 409 additions & 204 deletions
File tree
- .github/workflows
- tools
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
42 | 46 | | |
43 | 47 | | |
44 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
| 127 | + | |
127 | 128 | | |
128 | 129 | | |
129 | 130 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
| 38 | + | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
This file was deleted.
0 commit comments