Skip to content

ci: Add GitHub Actions CI/CD pipeline for v2#3

Merged
Perafan18 merged 5 commits intomasterfrom
feature/v2-cicd
Nov 9, 2025
Merged

ci: Add GitHub Actions CI/CD pipeline for v2#3
Perafan18 merged 5 commits intomasterfrom
feature/v2-cicd

Conversation

@Perafan18
Copy link
Owner

@Perafan18 Perafan18 commented Nov 9, 2025

  • Add automated testing workflow for all pushes and PRs
  • Configure MongoDB service container for tests
  • Run RuboCop linting automatically
  • Execute RSpec tests with coverage tracking
  • Set up Ruby 3.2.2 with bundler caching

Pipeline includes:

  • Automated code quality checks
  • Full test suite execution
  • Coverage verification
  • Fast feedback on pull requests

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Se ha establecido un sistema automático de validación que ejecuta verificaciones de calidad de código y pruebas exhaustivas con cada cambio realizado en el proyecto, garantizando que todos los aportes mantengan los estándares de calidad requeridos antes de ser incorporados. Esto proporciona mayor confiabilidad y consistencia en las entregas.

- Add automated testing workflow for all pushes and PRs
- Configure MongoDB service container for tests
- Run RuboCop linting automatically
- Execute RSpec tests with coverage tracking
- Set up Ruby 3.2.2 with bundler caching

Pipeline includes:
- Automated code quality checks
- Full test suite execution
- Coverage verification
- Fast feedback on pull requests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Nov 9, 2025

Warning

Rate limit exceeded

@Perafan18 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 10 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between d8d6f5a and 65fd757.

📒 Files selected for processing (4)
  • .rubocop.yml (1 hunks)
  • Gemfile (1 hunks)
  • spec/api_spec.rb (1 hunks)
  • spec/block_spec.rb (2 hunks)

Walkthrough

Se añade un nuevo flujo de trabajo de GitHub Actions que automatiza las pruebas del proyecto. El workflow se ejecuta en cambios hacia las ramas master/main, configura un entorno Ruby 3.2.2 con servicio MongoDB, ejecuta RuboCop para linting, lanza rspec con cobertura de código y verifica la generación del reporte de cobertura.

Changes

Cohort / Archivo(s) Resumen
Configuración de CI/CD
\.github/workflows/ci\.yml
Nuevo workflow de GitHub Actions que define un job de prueba con Ruby 3.2.2, MongoDB como servicio, ejecuta linting con RuboCop, pruebas con rspec incluyendo cobertura, y valida la generación del reporte de cobertura

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutos

  • Se trata de un archivo de configuración de workflow sin lógica de aplicación compleja
  • Es una adición única sin cambios heterogéneos
  • Solo requiere verificar que los pasos, versiones y variables de entorno sean apropiados

Poem

🐰 ¡Nuevo workflow en marcha!
Los tests corren sin parar,
Ruby y MongoDB de la mano,
La cobertura crece sin cesar—
¡CI ahora es realidad! ✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed El título describe claramente el cambio principal: la adición de un pipeline de CI/CD con GitHub Actions. Es conciso, específico y corresponde directamente al contenido del archivo agregado (.github/workflows/ci.yml).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

@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: 2

🧹 Nitpick comments (3)
.github/workflows/ci.yml (3)

28-29: Eliminar paso redundante de bundle install.

Cuando bundler-cache: true está configurado en ruby/setup-ruby@v1 (línea 26), las dependencias ya se cachean e instalan automáticamente. El paso de bundle install en la línea 29 es redundante y aumenta innecesariamente el tiempo de ejecución.

-    - name: Install dependencies
-      run: bundle install
-
     - name: Run RuboCop

13-17: Considerar fijar la versión de MongoDB en el servicio.

La imagen MongoDB se configura como mongo:latest, lo que puede causar inconsistencias si se introduce una versión con cambios de compatibilidad. Se recomienda pinear una versión específica para reproducibilidad y estabilidad.

       mongodb:
         image: mongo:latest
+        # Considerar: image: mongo:7.0 (versión específica)
         ports:
           - 27017:27017

10-11: Considerar agregar timeout-minutes al job.

Para prevenir workflows bloqueados que consumen recursos de manera innecesaria, se recomienda establecer un límite de tiempo para el job. Típicamente 15-30 minutos es apropiado para suite de tests completa.

   test:
     runs-on: ubuntu-latest
+    timeout-minutes: 30
 
     services:
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d946198 and d8d6f5a.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (1 hunks)
🧰 Additional context used
🪛 actionlint (1.7.8)
.github/workflows/ci.yml

20-20: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

- Fix Gemfile gem ordering
- Update spec/block_spec.rb formatting
- Update .rubocop.yml to disable unused cops
- Add rubocop:disable comment for RSpecRails/HaveHttpStatus
- All tests passing (16 examples, 0 failures)
- All RuboCop checks passing (8 files, no offenses)
The Capybara/RSpec/PredicateMatcher cop was causing internal errors
during RuboCop execution. Since this project doesn't use Capybara,
disabling this cop prevents the job from failing.

- Add Capybara/RSpec/PredicateMatcher: Enabled: false
- RuboCop now runs without internal errors
- All tests passing (16 examples, 0 failures)
- All RuboCop checks passing (8 files, no offenses)
@Perafan18 Perafan18 merged commit 59c87f0 into master Nov 9, 2025
1 check passed
@Perafan18 Perafan18 deleted the feature/v2-cicd branch November 9, 2025 21:11
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.

1 participant