Skip to content

Commit

Permalink
MONGOID-5818 Support Rails 8 (#5876) (#5898)
Browse files Browse the repository at this point in the history
  • Loading branch information
comandeo-mongo authored Nov 11, 2024
1 parent 484092b commit ea1dd1f
Show file tree
Hide file tree
Showing 21 changed files with 255 additions and 111 deletions.
82 changes: 62 additions & 20 deletions .evergreen/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ functions:
"upload test results":
- command: attach.xunit_results
params:
file: ./src/tmp/rspec.xml
file: ./src/rspec.xml

"run tests":
- command: shell.exec
Expand Down Expand Up @@ -308,7 +308,7 @@ post:
# Removed, causing timeouts
# - func: "upload working dir"
- func: "upload mo artifacts"
#- func: "upload test results"
# - func: "upload test results"
- func: "upload test results to s3"

task_groups:
Expand Down Expand Up @@ -596,6 +596,10 @@ axes:
display_name: "Rails 7.2"
variables:
RAILS: "7.2"
- id: "8.0"
display_name: "Rails 8.0"
variables:
RAILS: "8.0"

- id: "test-i18n-fallbacks"
display_name: Test i18n fallbacks
Expand Down Expand Up @@ -735,19 +739,6 @@ buildvariants:
tasks:
- name: "test"

- matrix_name: "rails-7"
matrix_spec:
ruby: ["ruby-3.3"]
driver: ["current"]
mongodb-version: "6.0"
topology: "standalone"
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "bson-min"
matrix_spec:
driver: [bson-min]
Expand All @@ -770,6 +761,44 @@ buildvariants:
tasks:
- name: "test"

- matrix_name: "rails-master"
matrix_spec:
ruby: ["ruby-3.2"]
driver: ["current"]
mongodb-version: "7.0"
topology: "standalone"
rails: ['master']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "rails-8"
matrix_spec:
ruby: ["ruby-3.3"]
driver: ["current"]
mongodb-version: "7.0"
topology: "standalone"
rails: ['8.0']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "rails-7"
matrix_spec:
ruby: ["ruby-3.3"]
driver: ["current"]
mongodb-version: "6.0"
topology: "standalone"
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "rails-6"
matrix_spec:
Expand All @@ -795,27 +824,40 @@ buildvariants:
tasks:
- name: "test"

- matrix_name: app-tests-rails-8
matrix_spec:
ruby: ["ruby-3.2", "ruby-3.3"]
driver: ["current"]
mongodb-version: '7.0'
topology: standalone
app-tests: yes
rails: ['8.0']
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"

- matrix_name: app-tests-rails-7
matrix_spec:
ruby: ["ruby-3.1", "ruby-3.2", "ruby-3.3"]
ruby: ["ruby-3.2", "ruby-3.3"]
driver: ["current"]
mongodb-version: '7.0'
topology: standalone
app-tests: yes
rails: ['6.1', '7.0', '7.1', '7.2']
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"

- matrix_name: app-tests-rails-6-0
- matrix_name: app-tests-rails-6
matrix_spec:
ruby: ["ruby-3.0"]
ruby: ["ruby-2.7"]
driver: ["current"]
mongodb-version: '5.0'
topology: standalone
app-tests: yes
rails: ['6.0']
rails: ['6.0', '6.1']
os: ubuntu-20.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
Expand Down
4 changes: 4 additions & 0 deletions .evergreen/config/axes.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ axes:
display_name: "Rails 7.2"
variables:
RAILS: "7.2"
- id: "8.0"
display_name: "Rails 8.0"
variables:
RAILS: "8.0"

- id: "test-i18n-fallbacks"
display_name: Test i18n fallbacks
Expand Down
4 changes: 2 additions & 2 deletions .evergreen/config/commands.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ functions:
"upload test results":
- command: attach.xunit_results
params:
file: ./src/tmp/rspec.xml
file: ./src/rspec.xml

"run tests":
- command: shell.exec
Expand Down Expand Up @@ -282,7 +282,7 @@ post:
# Removed, causing timeouts
# - func: "upload working dir"
- func: "upload mo artifacts"
#- func: "upload test results"
# - func: "upload test results"
- func: "upload test results to s3"

task_groups:
Expand Down
74 changes: 56 additions & 18 deletions .evergreen/config/variants.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -109,19 +109,6 @@ buildvariants:
tasks:
- name: "test"

- matrix_name: "rails-7"
matrix_spec:
ruby: ["ruby-3.3"]
driver: ["current"]
mongodb-version: "6.0"
topology: "standalone"
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "bson-min"
matrix_spec:
driver: [bson-min]
Expand All @@ -144,6 +131,44 @@ buildvariants:
tasks:
- name: "test"

- matrix_name: "rails-master"
matrix_spec:
ruby: ["ruby-3.2"]
driver: ["current"]
mongodb-version: "7.0"
topology: "standalone"
rails: ['master']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "rails-8"
matrix_spec:
ruby: ["ruby-3.3"]
driver: ["current"]
mongodb-version: "7.0"
topology: "standalone"
rails: ['8.0']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "rails-7"
matrix_spec:
ruby: ["ruby-3.3"]
driver: ["current"]
mongodb-version: "6.0"
topology: "standalone"
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
fle: helper
display_name: "${rails}, ${driver}, ${mongodb-version} (FLE ${fle})"
tasks:
- name: "test"

- matrix_name: "rails-6"
matrix_spec:
Expand All @@ -169,27 +194,40 @@ buildvariants:
tasks:
- name: "test"

- matrix_name: app-tests-rails-8
matrix_spec:
ruby: ["ruby-3.2", "ruby-3.3"]
driver: ["current"]
mongodb-version: '7.0'
topology: standalone
app-tests: yes
rails: ['8.0']
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"

- matrix_name: app-tests-rails-7
matrix_spec:
ruby: ["ruby-3.1", "ruby-3.2", "ruby-3.3"]
ruby: ["ruby-3.2", "ruby-3.3"]
driver: ["current"]
mongodb-version: '7.0'
topology: standalone
app-tests: yes
rails: ['6.1', '7.0', '7.1', '7.2']
rails: ['7.0', '7.1', '7.2']
os: ubuntu-22.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
- name: "test"

- matrix_name: app-tests-rails-6-0
- matrix_name: app-tests-rails-6
matrix_spec:
ruby: ["ruby-3.0"]
ruby: ["ruby-2.7"]
driver: ["current"]
mongodb-version: '5.0'
topology: standalone
app-tests: yes
rails: ['6.0']
rails: ['6.0', '6.1']
os: ubuntu-20.04
display_name: "app tests ${driver}, ${ruby}, ${rails}"
tasks:
Expand Down
2 changes: 1 addition & 1 deletion .evergreen/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,6 @@ if test -f tmp/rspec-all.json; then
mv tmp/rspec-all.json tmp/rspec.json
fi

python3 -m mtools.mlaunch.mlaunch stop --dir "$dbdir"
python3 -m mtools.mlaunch.mlaunch stop --dir "$dbdir" || true

exit ${test_status}
56 changes: 30 additions & 26 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,38 @@ jobs:
driver: stable
gemfile: gemfiles/driver_stable.gemfile
experimental: false
- mongodb: '6.0'
ruby: ruby-3.1
- mongodb: '7.0'
ruby: ruby-3.3
topology: server
os: ubuntu-22.04
task: test
driver: current
rails: '8.0'
fle: helper
gemfile: gemfiles/rails-8.0.gemfile
experimental: false
- mongodb: '7.0'
ruby: ruby-3.2
topology: server
os: ubuntu-20.04
task: test
driver: current
rails: '7.0'
rails: '7.2'
fle: helper
gemfile: gemfiles/rails-7.0.gemfile
gemfile: gemfiles/rails-7.2.gemfile
experimental: false
- mongodb: '6.0'
ruby: ruby-3.1
- mongodb: '7.0'
ruby: ruby-3.2
topology: server
os: ubuntu-20.04
task: test
driver: current
rails: '6.1'
rails: '7.1'
fle: helper
gemfile: gemfiles/rails-6.1.gemfile
gemfile: gemfiles/rails-7.1.gemfile
experimental: false
- mongodb: '6.0'
ruby: ruby-3.0
- mongodb: '7.0'
ruby: ruby-3.1
topology: server
os: ubuntu-20.04
task: test
Expand All @@ -80,6 +90,16 @@ jobs:
fle: helper
gemfile: gemfiles/rails-7.0.gemfile
experimental: false
- mongodb: '6.0'
ruby: ruby-3.1
topology: server
os: ubuntu-20.04
task: test
driver: current
rails: '6.1'
fle: helper
gemfile: gemfiles/rails-6.1.gemfile
experimental: false
- mongodb: '6.0'
ruby: ruby-3.0
topology: server
Expand Down Expand Up @@ -126,22 +146,6 @@ jobs:
driver: current
gemfile: Gemfile
experimental: false
- mongodb: '4.0'
ruby: ruby-2.7
topology: replica_set
os: ubuntu-20.04
task: test
driver: current
gemfile: Gemfile
experimental: false
- mongodb: '3.6'
ruby: ruby-2.7
topology: replica_set
os: ubuntu-20.04
task: test
driver: current
gemfile: Gemfile
experimental: false

steps:
- name: repo checkout
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ examples
.env
.env.private*
build
rspec.xml
4 changes: 4 additions & 0 deletions gemfiles/rails-6.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ source 'https://rubygems.org'
gem 'actionpack', '~> 6.0'
gem 'activemodel', '~> 6.0'

group :test do
gem 'activejob', '~> 6.0'
end

gemspec path: '..'

require_relative './standard'
Expand Down
Loading

0 comments on commit ea1dd1f

Please sign in to comment.