DOT-175: Add CI workflow and npm pack dry-run#13
Conversation
Co-authored-by: multica-agent <github@multica.ai>
|
Need the big picture first? Review this PR in Change Stack to see what changed before going file by file. 📝 WalkthroughWalkthroughAdds a GitHub Actions workflow that runs on pushes to main and pull requests, with repository contents read-only permissions; the job checks out code, sets up Node.js v24, runs ChangesCI Workflow and Release Validation
Possibly Related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
20-24: ⚡ Quick winEnable package manager caching to improve CI performance.
The
package-manager-cache: falsesetting forces npm to download all dependencies on every CI run. Enabling caching (by removing this line or setting it totrue) will significantly speed up CI runs without sacrificing correctness, sincenpm cialready ensures deterministic installs from the lock file.⚡ Proposed change to enable caching
- name: Setup Node.js uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e with: node-version: 24 - package-manager-cache: false🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml around lines 20 - 24, The CI workflow currently disables Node package manager caching via the `package-manager-cache: false` setting in the "Setup Node.js" step; change this to enable caching by removing that key or setting `package-manager-cache: true` so the actions/setup-node step can cache npm/yarn/pnpm artifacts and speed up subsequent runs (look for the "Setup Node.js" step and the `package-manager-cache` key in the `.github/workflows/ci.yml` file to update).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 17-18: The Checkout step currently uses actions/checkout without
disabling credential persistence; update the "Checkout" step (the step using
actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5) to include a with:
persist-credentials: false setting so GitHub credentials are not written to the
git config, reducing credential exposure risk.
---
Nitpick comments:
In @.github/workflows/ci.yml:
- Around line 20-24: The CI workflow currently disables Node package manager
caching via the `package-manager-cache: false` setting in the "Setup Node.js"
step; change this to enable caching by removing that key or setting
`package-manager-cache: true` so the actions/setup-node step can cache
npm/yarn/pnpm artifacts and speed up subsequent runs (look for the "Setup
Node.js" step and the `package-manager-cache` key in the
`.github/workflows/ci.yml` file to update).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c9202cd8-e469-44d5-805b-36111d647faa
📒 Files selected for processing (2)
.github/workflows/ci.ymlpackage.json
Combine PR branch CI (main push trigger, permissions, named steps, pack dry-run via check) with main's version:check PR guard and fetch-depth: 0. Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci.yml:
- Line 18: Replace the floating action tags `actions/checkout@v6` and
`actions/setup-node@v6` with their corresponding commit SHAs (pin to the exact
commit) and add `persist-credentials: false` to the checkout step; locate the
checkout and setup steps by the strings `actions/checkout@v6` and
`actions/setup-node@v6` in the workflow, swap the versions for the full SHA
values from the actions repositories, and include `persist-credentials: false`
under the checkout step to harden credentials handling.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 9a138352-d216-44e9-b56a-78bf8adc58ec
📒 Files selected for processing (2)
.github/workflows/ci.ymlpackage.json
🚧 Files skipped from review as they are similar to previous changes (1)
- package.json
Summary
ci.yml)を追加し、PR とmainへの push で typecheck / test / pack dry-run を実行npm run checkにnpm pack --dry-run(release:npm:dry)を統合し、ローカルと CI / publish の検証を揃えるMultica Issue: DOT-175
確認シナリオ
PR マージ前に、CI とローカル check が同じ検証(typecheck・test・pack dry-run)を通ることを確認する。
操作手順
npm ci && npm run checkを実行する期待結果
npm run checkも同様に成功するauto-release.yml→publish.yml連携は変更なし(publish.ymlは引き続きnpm run checkを実行するため、pack dry-run も自動的に含まれる)確認コマンド
注意する失敗パターン
npm pack --dry-runがfilesフィールド漏れで失敗する(今回の tarball には README / LICENSE / src が含まれることを確認済み)enginesは>=22.19.0)Summary by CodeRabbit