Skip to content

Commit

Permalink
Add Ruby 3.2 to the test matrix (& CI fixes) (#102)
Browse files Browse the repository at this point in the history
* Add Ruby 3.2 to CI matrix
* Bump Ruby for StandardRB check
* Add temporary fix for rubocop/rubocop#10675
* Add rubocop fixes
  • Loading branch information
thbar authored Dec 27, 2022
1 parent 9b0bf83 commit 39d4ac2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- head
- jruby
- jruby-head
Expand All @@ -27,7 +28,7 @@ jobs:
- run: bundle exec rake
# NOTE: calling "bundle install" because the cache apparently did not update due to the gemspec injection
- run: bundle install && bundle exec standardrb
if: matrix.ruby == '3.1' # not using "head" because rubocop won't work there yet
if: matrix.ruby == '3.2' # not using "head" because rubocop won't work there yet
# What's below helps having a single "status check" for mergeability, without
# having to add each new version to the list of expected status checks in GitHub.
# See https://github.community/t/status-check-for-a-matrix-jobs/127354/7
Expand Down
4 changes: 3 additions & 1 deletion kiba.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ Gem::Specification.new do |gem|
gem.homepage = "https://www.kiba-etl.org"
gem.license = "LGPL-3.0"
gem.files = `git ls-files | grep -Ev '^(examples)'`.split("\n")
gem.test_files = `git ls-files -- test/*`.split("\n")
# NOTE: temporarily disabled until
# https://github.com/rubocop/rubocop/issues/10675 is fixed
# gem.test_files = `git ls-files -- test/*`.split("\n")
gem.name = "kiba"
gem.require_paths = ["lib"]
gem.version = Kiba::VERSION
Expand Down
8 changes: 4 additions & 4 deletions test/test_integration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ def test_csv_to_csv

transform do |row|
row[:sex] = case row[:sex]
when "M" then "Male"
when "F" then "Female"
else "Unknown"
when "M" then "Male"
when "F" then "Female"
else "Unknown"
end
row # must be returned
end

# returning nil dismisses the row
transform do |row|
row[:sex] == "Female" ? row : nil
(row[:sex] == "Female") ? row : nil
end

transform TestRenameFieldTransform, :sex, :sex_2015
Expand Down

0 comments on commit 39d4ac2

Please sign in to comment.