feat(ci): skip setup-node and container for self-hosted runner#3339
feat(ci): skip setup-node and container for self-hosted runner#3339PierreBrisorgueil merged 1 commit intomasterfrom
Conversation
Remove `container: node:lts` so the job runs directly on the host. Add conditional `setup-node` (skipped when vars.RUNNER is set). Add explicit port mapping for the mongo service and switch the fallback URI to localhost so it works without a job container. Closes #3338
WalkthroughGitHub Actions workflow updated to support self-hosted ARC runners by removing the Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related issues
Possibly related PRs
🚥 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)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
Updates the CI workflow to better support self-hosted runners by running directly on the runner host (no job container) while keeping GitHub-hosted runs working with a Mongo service container.
Changes:
- Remove the job-level
container: node:ltsso the job executes on the runner host. - Add a conditional
actions/setup-node@v4step that runs only on GitHub-hosted runners. - Expose the MongoDB service on
localhostby mapping port27017and updating the default Mongo URI accordingly.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/CI.yml:
- Around line 12-16: The workflow currently declares services.mongo at the job
level (services.mongo) which forces Docker on all runners and breaks self-hosted
runs; split the CI job into two jobs gated on vars.RUNNER (e.g., one where
vars.RUNNER == "github-hosted" and one for self-hosted) so the hosted job
retains the services.mongo block and the self-hosted job removes services
entirely and relies on the DEVKIT_NODE_db_uri fallback; ensure both jobs run the
same steps (checkout, install, test) and share needed env/config so the
self-hosted path does not require Docker.
🪄 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: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 0ad37b78-2127-4c50-8b2e-5b410630b787
📒 Files selected for processing (1)
.github/workflows/CI.yml
Summary
container: node:ltsso the job runs directly on the runner hostsetup-node@v4step (only on GitHub-hosted, skipped whenvars.RUNNERis set)ports: 27017:27017mapping for the mongo service (required without a job container)mongohostname tolocalhost(host networking)Closes #3338
Test plan
vars.RUNNER+vars.MONGO_URI)Summary by CodeRabbit