Skip to content

feat(ci): skip setup-node and container for self-hosted runner#3339

Merged
PierreBrisorgueil merged 1 commit intomasterfrom
feat/ci-skip-setup-selfhosted
Mar 27, 2026
Merged

feat(ci): skip setup-node and container for self-hosted runner#3339
PierreBrisorgueil merged 1 commit intomasterfrom
feat/ci-skip-setup-selfhosted

Conversation

@PierreBrisorgueil
Copy link
Copy Markdown
Contributor

@PierreBrisorgueil PierreBrisorgueil commented Mar 27, 2026

Summary

  • Remove container: node:lts so the job runs directly on the runner host
  • Add conditional setup-node@v4 step (only on GitHub-hosted, skipped when vars.RUNNER is set)
  • Add explicit ports: 27017:27017 mapping for the mongo service (required without a job container)
  • Switch fallback mongo URI from mongo hostname to localhost (host networking)

Closes #3338

Test plan

  • CI passes on GitHub-hosted runner (ubuntu-latest) with setup-node + mongo service
  • CI passes on self-hosted runner with pre-installed node + external mongo (via vars.RUNNER + vars.MONGO_URI)

Summary by CodeRabbit

  • Chores
    • Updated continuous integration infrastructure to improve build reliability and testing consistency.

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
Copilot AI review requested due to automatic review settings March 27, 2026 07:49
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

Walkthrough

GitHub Actions workflow updated to support self-hosted ARC runners by removing the node:lts container, conditionally adding setup-node based on vars.RUNNER, configuring MongoDB as an explicit service, and updating the database URI fallback to localhost:27017.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/CI.yml
Removes container directive, adds conditional Node.js setup step, establishes MongoDB service with explicit port 27017, and updates DEVKIT_NODE_db_uri fallback from mongo:27017 to localhost:27017. Setup-node runs only when vars.RUNNER is unset (GitHub-hosted runners).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related issues

  • #3802: Touches the same CI workflow steps (actions/setup-node conditioning and Mongo connection handling) across Vue repository.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: removing setup-node and container configuration for self-hosted runners, which is the primary objective of the PR.
Description check ✅ Passed The description covers the key changes, rationale, and includes a test plan, though it deviates from the template structure by omitting several standard sections like Scope, Validation checklist, and Guardrails check.
Linked Issues check ✅ Passed The PR implementation matches the requirements from #3338: removes container, adds conditional setup-node, adds port mapping for mongo service, and changes the fallback URI to localhost.
Out of Scope Changes check ✅ Passed All changes are directly scoped to the CI workflow and address the specific objectives outlined in #3338; no unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/ci-skip-setup-selfhosted

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:lts so the job executes on the runner host.
  • Add a conditional actions/setup-node@v4 step that runs only on GitHub-hosted runners.
  • Expose the MongoDB service on localhost by mapping port 27017 and updating the default Mongo URI accordingly.

Comment thread .github/workflows/CI.yml
Comment thread .github/workflows/CI.yml
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2a6b6ef and ac86a96.

📒 Files selected for processing (1)
  • .github/workflows/CI.yml

Comment thread .github/workflows/CI.yml
@PierreBrisorgueil PierreBrisorgueil merged commit 921a706 into master Mar 27, 2026
7 checks passed
@PierreBrisorgueil PierreBrisorgueil deleted the feat/ci-skip-setup-selfhosted branch March 27, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(ci): skip setup-node and container when using self-hosted runner

2 participants