Skip to content

Fix capistrano configuration and CI - #165

Merged
andreslucena merged 5 commits into
masterfrom
chore/capistron-node-config
Jun 10, 2026
Merged

Fix capistrano configuration and CI#165
andreslucena merged 5 commits into
masterfrom
chore/capistron-node-config

Conversation

@fblupi

@fblupi fblupi commented Jun 9, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores

    • Upgraded Ruby to 3.4.7 and Node.js to 22.14.0; updated CI runner to Ubuntu 24.04 and added OS library installation step.
    • Declared Node/npm engine requirements, added NVM integration for deployments, and adjusted deployment tooling and install commands.
  • Tests

    • Updated system tests to use direct navigation and revised menu and sign-up assertions to match updated UI containers.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Updates runtime versions (Node → 22.14.0, Ruby → 3.4.7), switches CI tests to ubuntu-24.04 and installs OS libraries, adds Capistrano NVM integration, changes deployment npm invocation to execute :npm, 'ci', and adjusts several system spec interactions and assertions.

Changes

Tooling, CI, Deployment, and Specs

Layer / File(s) Summary
Global version declarations
.github/workflows/decidim_ci.yml, package.json
CI workflow and package.json engines declare Node.js 22.14.0 and Ruby 3.4.7.
CI runner and system package install
.github/workflows/decidim_ci.yml
jobs.tests.runs-on changed to ubuntu-24.04 and a step added to apt-get install libicu-dev, imagemagick, libvips, libvips-tools.
Capistrano NVM integration
Gemfile, Capfile
Add capistrano-nvm to development group and require "capistrano/nvm" in Capfile.
Deployment configuration and npm invocation
config/deploy.rb
Switch NVM settings to user-based with Node v22.14.0, bump SSHKit constraint, and change webpacker task to run execute :npm, 'ci' (remove NVM sourcing in that step).
System spec interactions and assertions
spec/features/authentication_spec.rb, spec/features/homepage_spec.rb, spec/features/menu_spec.rb
Replace sign-up link click with direct visit, update homepage .main-bar expected text to Log in, and adjust menu open interactions and assertion containers for desktop and mobile tests.

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested labels: enhancement

"I hopped through versions, bright and spry,
Node and Ruby reaching for the sky,
CI packs the tools, NVM takes the lead,
Tests follow clicks and assertions indeed,
A rabbit's cheer for builds that fly!" 🐇✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'Fix capistrano configuration and CI' directly describes the main changes: updates to Capistrano deployment configuration (Capfile, Gemfile, config/deploy.rb) and CI workflow updates (.github/workflows/decidim_ci.yml).

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/capistron-node-config

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
package.json (1)

21-25: ⚡ Quick win

Consider using a version range for Node.js instead of an exact version.

The engines.node field specifies an exact version "22.14.0", which will cause npm/yarn to reject any other Node version (including patch updates like 22.14.1). This can create friction for developers and CI environments that use slightly different versions.

Consider using a range like ">=22.14.0 <23.0.0" or "^22.14.0" to allow compatible versions while still enforcing the major version constraint.

♻️ Suggested engine constraint
  "engines": {
-   "node": "22.14.0",
+   "node": ">=22.14.0 <23.0.0",
    "npm": ">=10.0.0",
    "yarn": "~1.22.1"
  }
🤖 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 `@package.json` around lines 21 - 25, The engines.node field currently pins an
exact Node version ("22.14.0") which is too restrictive; update the package.json
engines entry (the "engines" object, key "node") to use a range such as
">=22.14.0 <23.0.0" or a caret range like "^22.14.0" so patch/minor updates are
allowed while keeping major constraints; ensure npm/yarn compatibility by
choosing the appropriate range and updating any CI/README notes if they
reference the exact version.
🤖 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 `@config/deploy.rb`:
- Around line 12-14: The nvm_map_bins setting currently includes the Ruby tool
"rake" which is wrong; update the Capistrano config by removing "rake" from the
set :nvm_map_bins declaration (leave only Node-related binaries like "node" and
"npm") so the nvm plugin only maps Node.js bins and does not try to force a Node
environment for Ruby tooling.

---

Nitpick comments:
In `@package.json`:
- Around line 21-25: The engines.node field currently pins an exact Node version
("22.14.0") which is too restrictive; update the package.json engines entry (the
"engines" object, key "node") to use a range such as ">=22.14.0 <23.0.0" or a
caret range like "^22.14.0" so patch/minor updates are allowed while keeping
major constraints; ensure npm/yarn compatibility by choosing the appropriate
range and updating any CI/README notes if they reference the exact version.
🪄 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

Run ID: f2ee3210-3bf9-4b37-92e3-bf6c3f42f55f

📥 Commits

Reviewing files that changed from the base of the PR and between f38fd3d and a0e44cb.

⛔ Files ignored due to path filters (2)
  • Gemfile.lock is excluded by !**/*.lock
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (5)
  • .github/workflows/decidim_ci.yml
  • Capfile
  • Gemfile
  • config/deploy.rb
  • package.json

Comment thread config/deploy.rb
@fblupi
fblupi force-pushed the chore/capistron-node-config branch from c712d1b to 426c50c Compare June 9, 2026 14:47
@fblupi
fblupi requested a review from andreslucena June 9, 2026 14:50

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/decidim_ci.yml:
- Line 35: The apt-get install command in the CI workflow contains a duplicate
-y flag; update the run step that currently reads the install invocation to
remove the extra "-y" so it uses a single "-y" (i.e., change the run command
string that installs libicu-dev, imagemagick, libvips, libvips-tools by removing
the repeated -y).
🪄 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

Run ID: a138b099-2cc1-42ad-bd0f-749388d47757

📥 Commits

Reviewing files that changed from the base of the PR and between a0e44cb and 426c50c.

📒 Files selected for processing (4)
  • .github/workflows/decidim_ci.yml
  • spec/features/authentication_spec.rb
  • spec/features/homepage_spec.rb
  • spec/features/menu_spec.rb

Comment thread .github/workflows/decidim_ci.yml Outdated
@fblupi fblupi changed the title Fix capistrano configuration Fix capistrano configuration and CI Jun 9, 2026
@andreslucena
andreslucena merged commit 41ff5ca into master Jun 10, 2026
2 checks passed
@fblupi
fblupi deleted the chore/capistron-node-config branch June 10, 2026 10:29
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.

2 participants