Skip to content

Commit

Permalink
Merge pull request #697 from Dynamoid/ak/add-ruby-3-3-on-ci
Browse files Browse the repository at this point in the history
Add Ruby 3.3 on CI
  • Loading branch information
andrykonchin committed Dec 31, 2023
2 parents 6d53f10 + 13cce10 commit 7104dca
Show file tree
Hide file tree
Showing 57 changed files with 379 additions and 282 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ jobs:
- rails_6_0
- rails_6_1
- rails_7_0
- rails_7_1
rubygems:
- default
bundler:
Expand All @@ -52,8 +53,19 @@ jobs:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
exclude:

# Rails 7.1 requires Ruby 2.7 and above
- gemfile: rails_7_1
ruby: "2.3"
- gemfile: rails_7_1
ruby: "2.4"
- gemfile: rails_7_1
ruby: "2.5"
- gemfile: rails_7_1
ruby: "2.6"

# Rails 7.0 requires Ruby 2.7 and above
- gemfile: rails_7_0
ruby: "2.3"
Expand Down Expand Up @@ -101,6 +113,15 @@ jobs:
gemfile: rails_5_1
- ruby: "3.2"
gemfile: rails_5_2
- ruby: "3.3"
gemfile: rails_4_2
- ruby: "3.3"
gemfile: rails_5_0
- ruby: "3.3"
gemfile: rails_5_1
- ruby: "3.3"
gemfile: rails_5_2

- ruby: "jruby"
gemfile: rails_4_2
- ruby: "jruby"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
bundler:
- latest
ruby:
- "2.7"
- "3.3"
runs-on: ubuntu-latest
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/style.gemfile
Expand Down
13 changes: 10 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# We chose not to make these changes
inherit_from:
- .rubocop_gemspec.yml
- .rubocop_performance.yml
- .rubocop_rspec.yml
- .rubocop_thread_safety.yml
- .rubocop_todo.yml

inherit_gem:
rubocop-lts: rubocop-lts.yml

require:
- rubocop-md
- rubocop-packaging
Expand All @@ -19,6 +17,8 @@ require:
# It's the lowest supported Ruby version
AllCops:
DisplayCopNames: true # Display the name of the failing cops
TargetRubyVersion: 2.3
NewCops: enable

# It's a matter of taste
Layout/ParameterAlignment:
Expand Down Expand Up @@ -102,3 +102,10 @@ Naming/PredicateName:
Security/YAMLLoad:
Enabled: false

Lint/EmptyClass:
Exclude:
- README.md
Lint/EmptyBlock:
Exclude:
- README.md

9 changes: 9 additions & 0 deletions .rubocop_gemspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# specifying Ruby version would be a breaking change
# we may consider adding `required_ruby_version` in the next major release
Gemspec/RequiredRubyVersion:
Enabled: false

# development dependencies specified in the gemspec file are shared
# by the main Gemfile and gemfiles in the gemfiles/ directory that are used on CI
Gemspec/DevelopmentDependencies:
Enabled: false
3 changes: 3 additions & 0 deletions .rubocop_performance.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# See: https://github.com/rubocop/rubocop-performance/issues/322
Performance/RegexpMatch:
Enabled: false

Performance/MethodObjectAsBlock:
Enabled: false
14 changes: 13 additions & 1 deletion .rubocop_rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ RSpec/FilePath:
RSpec/MultipleExpectations:
Enabled: false

RSpec/MultipleMemoizedHelpers:
Enabled: false

RSpec/NamedSubject:
Enabled: false

Expand All @@ -21,7 +24,7 @@ RSpec/InstanceVariable:

RSpec/NestedGroups:
Enabled: false

RSpec/ExpectInHook:
Enabled: false

Expand All @@ -30,3 +33,12 @@ RSpec/ExpectInHook:
# got #<BigDecimal:...> => 101.0 (0.101e3)
RSpec/BeEql:
Enabled: false

RSpec/BeEq:
Enabled: false

RSpec/StubbedMock:
Enabled: false

RSpec/IndexedLet:
Enabled: false
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.0
2 changes: 1 addition & 1 deletion .simplecov
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ if RUN_COVERAGE
track_files '**/*.rb'

if ALL_FORMATTERS
command_name "#{ENV['GITHUB_WORKFLOW']} Job #{ENV['GITHUB_RUN_ID']}:#{ENV['GITHUB_RUN_NUMBER']}"
command_name "#{ENV.fetch('GITHUB_WORKFLOW')} Job #{ENV.fetch('GITHUB_RUN_ID')}:#{ENV.fetch('GITHUB_RUN_NUMBER')}"
else
formatter SimpleCov::Formatter::HTMLFormatter
end
Expand Down
8 changes: 8 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,11 @@ end
appraise 'rails-6-1' do
gem 'activemodel', '~> 6.1.0'
end

appraise 'rails-7-0' do
gem 'activemodel', '~> 7.0.0'
end

appraise 'rails-7-1' do
gem 'activemodel', '~> 7.1.0'
end
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

### Added
* [#697](https://github.com/Dynamoid/dynamoid/pull/697) Ensure Ruby 3.3 and Rails 7.1 versions are supported and added them on CI.

### Changed

Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ gemspec
# All CI jobs must use a discrete Gemfile located at gemfiles/*.gemfile. They will not use this Gemfile
if ENV['CI'].nil?
ruby_version = Gem::Version.new(RUBY_VERSION)
minimum_version = ->(version, engine = 'ruby') { ruby_version >= Gem::Version.new(version) && RUBY_ENGINE == engine }
minimum_version = ->(version, engine = 'ruby') { ruby_version >= Gem::Version.new(version) && engine == RUBY_ENGINE }
committing = minimum_version.call('2.4')
linting = minimum_version.call('2.7')
coverage = minimum_version.call('2.7')
Expand Down
142 changes: 80 additions & 62 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,108 +1,131 @@
PATH
remote: .
specs:
dynamoid (3.8.0)
dynamoid (3.9.0)
activemodel (>= 4)
aws-sdk-dynamodb (~> 1.0)
concurrent-ruby (>= 1.0)

GEM
remote: https://rubygems.org/
specs:
activemodel (7.0.4)
activesupport (= 7.0.4)
activesupport (7.0.4)
activemodel (7.1.2)
activesupport (= 7.1.2)
activesupport (7.1.2)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
appraisal (2.4.1)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
aws-eventstream (1.2.0)
aws-partitions (1.679.0)
aws-sdk-core (3.168.4)
aws-eventstream (~> 1, >= 1.0.2)
aws-eventstream (1.3.0)
aws-partitions (1.876.0)
aws-sdk-core (3.190.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.5)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-dynamodb (1.80.0)
aws-sdk-core (~> 3, >= 3.165.0)
aws-sdk-dynamodb (1.98.0)
aws-sdk-core (~> 3, >= 3.188.0)
aws-sigv4 (~> 1.1)
aws-sigv4 (1.5.2)
aws-sigv4 (1.8.0)
aws-eventstream (~> 1, >= 1.0.2)
base64 (0.2.0)
bigdecimal (3.1.5)
byebug (11.1.3)
childprocess (4.1.0)
codecov (0.6.0)
simplecov (>= 0.15, < 0.22)
coderay (1.1.3)
concurrent-ruby (1.1.10)
concurrent-ruby (1.2.2)
connection_pool (2.4.1)
diff-lcs (1.5.0)
docile (1.4.0)
i18n (1.12.0)
drb (2.2.0)
ruby2_keywords
i18n (1.14.1)
concurrent-ruby (~> 1.0)
iniparse (1.5.0)
jaro_winkler (1.5.4)
jmespath (1.6.2)
json (2.6.3)
json (2.7.1)
language_server-protocol (3.17.0.3)
method_source (1.0.0)
minitest (5.16.3)
overcommit (0.59.1)
minitest (5.20.0)
mutex_m (0.2.0)
overcommit (0.61.0)
childprocess (>= 0.6.3, < 5)
iniparse (~> 1.4)
rexml (~> 3.2)
parallel (1.22.1)
parser (3.1.3.0)
parallel (1.24.0)
parser (3.2.2.4)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.8.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (~> 0.10)
pry (>= 0.13, < 0.15)
racc (1.7.3)
rainbow (3.1.1)
rake (13.0.6)
rexml (3.2.5)
rake (13.1.0)
regexp_parser (2.8.3)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.1)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.1)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rubocop (0.81.0)
jaro_winkler (~> 1.5.1)
rspec-support (3.12.1)
rubocop (1.59.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.7.0.1)
parser (>= 3.2.2.4)
rainbow (>= 2.2.2, < 4.0)
rexml
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 2.0)
rubocop-lts (10.0.1)
rubocop-ruby2_3 (~> 1.0.3)
rubocop-md (0.4.1)
rubocop (>= 0.60)
rubocop-packaging (0.1.1)
rubocop (>= 0.75.0)
rubocop-performance (1.6.1)
rubocop (>= 0.71.0)
rubocop-rake (0.5.1)
rubocop
rubocop-rspec (1.41.0)
rubocop (>= 0.68.1)
rubocop-ruby2_3 (1.0.3)
rubocop (= 0.81.0)
rubocop-thread_safety (0.4.4)
rubocop (>= 0.53.0)
ruby-progressbar (1.11.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.30.0)
parser (>= 3.2.1.0)
rubocop-capybara (2.19.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.24.0)
rubocop (~> 1.33)
rubocop-md (1.2.2)
rubocop (>= 1.0)
rubocop-packaging (0.5.2)
rubocop (>= 1.33, < 2.0)
rubocop-performance (1.20.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
rubocop-rspec (2.25.0)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-thread_safety (0.5.1)
rubocop (>= 0.90.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -116,19 +139,15 @@ GEM
simplecov
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
thor (1.2.1)
tzinfo (2.0.5)
thor (1.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (1.8.0)
webrick (1.7.0)
yard (0.9.28)
webrick (~> 1.7.0)
unicode-display_width (2.5.0)
yard (0.9.34)

PLATFORMS
x86_64-darwin-19
x86_64-darwin-21
ruby
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
appraisal
Expand All @@ -141,7 +160,6 @@ DEPENDENCIES
pry-debugger-jruby
rake (~> 13.0)
rspec (~> 3.12)
rubocop-lts (~> 10.0)
rubocop-md
rubocop-packaging
rubocop-performance
Expand All @@ -155,4 +173,4 @@ DEPENDENCIES
yard

BUNDLED WITH
2.3.26
2.5.3
Loading

0 comments on commit 7104dca

Please sign in to comment.