Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rails 7.2 support #374

Merged
merged 5 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 41 additions & 23 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ orbs:
jobs:
run-specs:
executor:
name: solidusio_extensions/<<parameters.database>>
ruby_version: <<parameters.ruby_version>>
name: solidusio_extensions/<<parameters.database>>
ruby_version: <<parameters.ruby_version>>
steps:
- checkout
- browser-tools/install-chrome
Expand All @@ -26,15 +26,15 @@ jobs:
sudo apt-get install -yq libvips-dev
when: always
- run:
name: 'Solidus <<parameters.solidus_branch>>: Install gems'
name: "Solidus <<parameters.solidus_branch>>: Install gems"
command: |
bundle install
environment:
RAILS_VERSION: <<parameters.rails_version>>
SOLIDUS_BRANCH: <<parameters.solidus_branch>>
when: always
- run:
name: 'Solidus <<parameters.solidus_branch>>: Install sandbox with generated starter frontend'
name: "Solidus <<parameters.solidus_branch>>: Install sandbox with generated starter frontend"
command: |
<<#parameters.coverage>>export COVERAGE=true<</parameters.coverage>>
bin/sandbox --seed=false --sample=false
Expand All @@ -44,13 +44,15 @@ jobs:
SOLIDUS_BRANCH: <<parameters.solidus_branch>>
when: always
- run:
name: 'Runs tests on Solidus <<parameters.solidus_branch>>'
name: "Runs tests on Solidus <<parameters.solidus_branch>>"
command: |
cd sandbox
bin/rails db:environment:set RAILS_ENV=test
bundle add rspec_junit_formatter --group test
<<#parameters.coverage>>export COVERAGE=true<</parameters.coverage>>
bundle exec rspec --format progress --format RspecJunitFormatter --out ../test-results/results.xml
environment:
RAILS_ENV: test
RAILS_VERSION: <<parameters.rails_version>>
SOLIDUS_BRANCH: <<parameters.solidus_branch>>
when: always
Expand All @@ -66,17 +68,16 @@ jobs:
destination: coverage
- run:
command: rm -rf sandbox
name: 'Solidus <<parameters.solidus_branch>>: Clean up'
name: "Solidus <<parameters.solidus_branch>>: Clean up"
when: always
- solidusio_extensions/store-test-results

parameters:
solidus_branch:
type: string
default: 'main'
default: "main"
rails_version:
type: string
default: '~> 7.1.0'
ruby_version:
type: string
database:
Expand All @@ -89,27 +90,44 @@ workflows:
"Run specs on development Solidus version":
jobs:
- run-specs:
name: run-specs-with-postgres-ruby-3-2
database: 'postgres'
ruby_version: '3.2'
name: run-specs-with-postgres-ruby-3-1-rails-7-2
database: "postgres"
ruby_version: "3.1"
rails_version: "~> 7.2.0"

- run-specs:
name: run-specs-with-postgres-ruby-3-1
database: 'postgres'
ruby_version: '3.1'
name: run-specs-with-postgres-ruby-3-2-rails-7-2
database: "postgres"
ruby_version: "3.2"
rails_version: "~> 7.2.0"

- run-specs:
name: run-specs-with-postgres-ruby-3-0
database: 'postgres'
ruby_version: '3.0'
name: run-specs-with-postgres-ruby-3-3-rails-7-2
database: "postgres"
ruby_version: "3.3"
rails_version: "~> 7.2.0"

- run-specs:
name: run-specs-with-mysql-ruby-3-2
database: 'mysql'
ruby_version: '3.2'
name: run-specs-with-postgres-ruby-3-1-rails-7-1
database: "postgres"
ruby_version: "3.1"
rails_version: "~> 7.1.0"

- run-specs:
name: run-specs-with-sqlite-ruby-3-2
database: 'sqlite'
ruby_version: '3.2'
name: run-specs-with-postgres-ruby-3-2-rails-7-1
database: "postgres"
ruby_version: "3.2"
rails_version: "~> 7.1.0"

- run-specs:
name: run-specs-with-mysql-ruby-3-2-rails-7-2
database: "mysql"
ruby_version: "3.2"
rails_version: "~> 7.2.0"

- run-specs:
name: run-specs-with-sqlite-ruby-3-2-rails-7-2
database: "sqlite"
ruby_version: "3.2"
rails_version: "~> 7.2.0"
coverage: true
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

source 'https://rubygems.org'

gem 'rails', ENV['RAILS_VERSION'] || '~> 7.1.0'
gem 'rails', ENV['RAILS_VERSION'] || '~> 7.2.0'

group :development do
gem 'guard'
Expand Down