Skip to content

Migrate React on Rails Pro CI from CircleCI to GitHub Actions #1871

@AbanoubGhadban

Description

@AbanoubGhadban

Summary

Migrate the React on Rails Pro package CI/CD pipeline from CircleCI to GitHub Actions to consolidate all testing infrastructure in one platform.

Background

Currently:

  • Main package (react-on-rails): Uses GitHub Actions (.github/workflows/*.yml)
  • Pro package (react-on-rails-pro): Uses CircleCI (.circleci/config.yml)

This creates maintenance overhead and splits CI visibility across two platforms.

Migration Plan

CircleCI Jobs to Migrate (10 jobs total):

  1. lint-js-and-ruby - Linting for Pro package (JS, Ruby, formatting, TypeScript)
  2. install-package-node-packages - Install Pro package node modules (caching job)
  3. install-dummy-app-node-packages - Install dummy app node modules (caching job)
  4. install-package-ruby-gems - Install Pro package Ruby gems (caching job)
  5. install-dummy-app-ruby-gems - Install dummy app Ruby gems (caching job)
  6. build-dummy-app-webpack-test-bundles - Build webpack test bundles
  7. package-js-tests - Jest unit tests for Pro package
  8. rspec-package-specs - RSpec tests for Pro package
  9. rspec-dummy-app-node-renderer - RSpec integration tests with Node renderer (includes test splitting)
  10. dummy-app-node-renderer-e2-tests - Playwright E2E tests (requires Redis service)

New GitHub Actions Workflows (3 files):

  1. .github/workflows/pro-lint.yml - Linting workflow
  2. .github/workflows/pro-package-tests.yml - Unit tests workflow
  3. .github/workflows/pro-integration-tests.yml - Integration & E2E tests workflow

Key Implementation Details:

  • Test Parallelization: Use GitHub Actions matrix strategy with sharding for RSpec tests (replaces CircleCI test splitting)
  • Redis Service: Use GitHub Actions service containers for E2E tests
  • Caching: Migrate to actions/cache@v4 with similar key patterns
  • Ruby/Node Versions: Ruby 3.3.7, Node 20/22
  • Browser Tests: Chrome installation for Capybara/Playwright tests
  • Working Directory: All commands run from react_on_rails_pro/
  • Artifacts: Store test results, screenshots, and logs

Migration Strategy:

Phase 1: Create GitHub Actions workflows (keep CircleCI running in parallel)
Phase 2: Verify all tests pass and artifacts are stored correctly
Phase 3: Monitor both systems for 1-2 weeks
Phase 4: Remove CircleCI config once GitHub Actions is proven stable

Technical Feasibility:

✅ All CircleCI features can be replicated in GitHub Actions
✅ Test splitting: Achievable with matrix strategy + RSpec sharding
✅ Redis service: Native support via service containers
✅ Background processes: Works identically in both platforms
✅ Caching: Full support with similar patterns
✅ Artifacts & test results: Full support

No blockers identified - migration is straightforward and low-risk.

Benefits

  • ✅ Unified CI platform (all workflows in GitHub Actions)
  • ✅ Better visibility (all CI results in one place)
  • ✅ Reduced maintenance overhead
  • ✅ Cost consolidation
  • ✅ Consistent workflow patterns across main and pro packages

Related

  • Main package workflows: .github/workflows/main.yml, lint-js-and-ruby.yml, etc.
  • CircleCI config: .circleci/config.yml

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions