ci: add lime-elements integration validation workflow#163
ci: add lime-elements integration validation workflow#163adrianschmidt merged 3 commits intojgroth:mainfrom
Conversation
|
Fixed both issues in 685706b:
|
There was a problem hiding this comment.
Pull request overview
Adds a new advisory GitHub Actions workflow that builds lime-elements docs twice (baseline vs. PR kompendium) to detect kompendium regressions against lime-elements before release.
Changes:
- Introduces
.github/workflows/validate-lime-elements.ymlto build kompendium, pack it, and run a two-stage lime-elements docs build (published vs PR tarball). - Adds validation of generated
.kompendium/kompendium.jsonstructure and publishes a Step Summary. - Implements a “fail only on regression” gate based on baseline vs PR outcomes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Addressed all Copilot review feedback in 3923acf:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📝 WalkthroughWalkthroughAdds a new CI workflow that builds a baseline with the published kompendium, packs and installs the kompendium PR tarball into lime-elements, runs a PR docs build, validates the produced Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Kompendium PR
participant GA as GitHub Actions
participant Node as Node/npm
participant LE as lime-elements repo
participant Validator as kompendium.json validator
rect rgba(100,150,240,0.5)
PR->>GA: open PR -> trigger workflow
end
GA->>PR: checkout kompendium PR
GA->>Node: setup Node.js & cache deps
GA->>PR: build & pack kompendium -> tarball
GA->>LE: checkout lime-elements (main)
GA->>LE: restore/cache node_modules
rect rgba(150,200,120,0.5)
GA->>LE: baseline build (published kompendium)
LE->>GA: baseline artifacts/status
end
rect rgba(240,180,120,0.5)
GA->>LE: install PR tarball
GA->>LE: PR build
LE->>Validator: emit kompendium.json for validation
Validator->>GA: validation result (exists, JSON, .docs.components) + counts
end
GA->>PR: post PR summary & mark fail on regression
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
56cc930 to
5db37d9
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In @.github/workflows/validate-lime-elements.yml:
- Around line 47-60: The cache step using actions/cache@v4 (step id: cache-le)
currently saves lime-elements/node_modules after later running `npm link
kompendium`, which inserts workspace-specific symlinks that poison the cache;
change the workflow to use separate restore and save actions
(actions/cache/restore@v4 and actions/cache/save@v4) so you restore before `npm
ci` and save immediately after `npm ci` (and before the `npm link kompendium`
step) to ensure the cached node_modules are the clean, link-free state; update
the cache key usage the same way but only perform the final save prior to
running `npm link kompendium`.
Adds a PR check that validates kompendium changes against lime-elements to catch regressions before they're released. How it works: 1. Build kompendium PR and register for linking 2. Checkout lime-elements main branch 3. Stage 1 (Baseline): Build docs with published kompendium 4. Stage 2 (PR): Link PR kompendium and rebuild 5. Validate kompendium.json structure 6. Report results and fail only on regression Uses npm link instead of tarball installation to avoid npm dependency resolution issues that could cause conflicting package versions.
TypeScript was incorrectly listed as a runtime dependency, but TypeDoc uses it as a peerDependency. Moving to devDependencies and updating to ^4.9.5 fixes the invalid dependency tree (cosmiconfig requires >=4.9.5).
TypeScript 4.8 deprecated the node.decorators property and introduced ts.getDecorators(node) as the new API. This fixes decorator extraction when using TypeScript 4.9.5.
5db37d9 to
009c45c
Compare
|
@coderabbitai resume |
✅ Actions performedReviews resumed. |
|
🎉 This PR is included in version 1.0.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Summary
Adds a PR check that validates kompendium changes against lime-elements to catch regressions before they're released.
How It Works
npm linkand rebuildKey Design Decisions
npm linkover tarballWhy
npm linkinstead of tarball?When installing a tarball, npm re-resolves dependencies which can cause:
npm linkcreates a symlink without dependency resolution, preserving lime-elements' existing node_modules structure.Future improvement: Use a local npm registry (e.g., verdaccio) to publish the PR and install from there. This would perfectly simulate real-world installation behavior.
Failure Behavior
Additional Changes
This PR also includes two fixes discovered during integration testing:
fix(deps): Move typescript from dependencies to devDependencies and update to ^4.9.5
fix(typedoc): Use
ts.getDecorators()API for TypeScript 4.8+node.decoratorspropertyts.canHaveDecorators(node)+ts.getDecorators(node)Future Enhancements (not in this PR)
Summary by CodeRabbit