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

Fix CI, bump minimum Ruby version to 3.1 #41

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7', '3.1']
ruby-version: ['3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake
run: script/test
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## Unreleased
* Minimum supported Ruby version is now 3.1

## 0.2.1

* Fix Windows paths [#31](https://github.com/testdouble/good-migrations/pull/31)
Expand Down
53 changes: 33 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ GEM
erubi (1.10.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
json (2.8.2)
language_server-protocol (3.17.0.3)
lint_roller (1.1.0)
loofah (2.16.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
Expand All @@ -48,9 +51,10 @@ GEM
nokogiri (1.13.4)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
parallel (1.22.1)
parser (3.1.2.0)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
pry (0.14.1)
coderay (~> 1.1)
method_source (~> 1.0)
Expand All @@ -72,30 +76,39 @@ GEM
zeitwerk (~> 2.5)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.3.0)
rexml (3.2.5)
rubocop (1.27.0)
regexp_parser (2.9.2)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.16.0, < 2.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.17.0)
parser (>= 3.1.1.0)
rubocop-performance (1.13.3)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.11.0)
standard (1.10.0)
rubocop (= 1.27.0)
rubocop-performance (= 1.13.3)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.36.1)
parser (>= 3.3.1.0)
rubocop-performance (1.22.1)
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
ruby-progressbar (1.13.0)
standard (1.42.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.68.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.5)
standard-custom (1.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.50)
standard-performance (1.5.0)
lint_roller (~> 1.1)
rubocop-performance (~> 1.22.0)
thor (1.2.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
unicode-display_width (2.6.0)
zeitwerk (2.5.4)

PLATFORMS
Expand Down
4 changes: 2 additions & 2 deletions example/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ gem "rails", "~> 6.1"

gem "good_migrations", path: ".."

gem "sqlite3"
gem "sqlite3", "~> 1.7.3"

gem "zeitwerk", github: "fxn/zeitwerk"
gem "zeitwerk", "~> 2.6"

gem "bootsnap", require: false
2 changes: 1 addition & 1 deletion good_migrations.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
spec.description = "Referencing code in app/ from a database migration risks breaking the migration when your app code changes; this gem prevents that mistake"
spec.homepage = "https://github.com/testdouble/good-migrations"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.3.0"
spec.required_ruby_version = ">= 3.1.0"
spec.metadata["rubygems_mfa_required"] = "true"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
Expand Down
13 changes: 13 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -euo pipefail

echo "---> Installing dependencies in example app"
cd example
bundle
cd ..

echo "---> Running tests"
bundle exec rake

echo "---> Job's done!"