Skip to content

Commit

Permalink
Improve CI
Browse files Browse the repository at this point in the history
- Test against Rails 7.2
- Test against Ruby 3.3
- Make lockfile platforms easier to maintain
  (ref: activeadmin/activeadmin#8344)
- Update bundles by using the minimum supported ruby version
  • Loading branch information
tagliala committed Oct 11, 2024
1 parent 74ab67f commit 0de9722
Show file tree
Hide file tree
Showing 12 changed files with 392 additions and 167 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/minitest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,36 @@ jobs:
- '3.0'
- '3.1'
- '3.2'
- '3.3'
gemfile:
- rails_6_1_4
- rails_7_0
- rails_7_1
- rails_7_2
- rails_next
image_processor:
- vips
- mini_magick
exclude:
# ruby 3.3 only supports rails 7.0+
- ruby: '3.3'
gemfile: rails_6_1_4
# ruby 3.2 only supports rails 7.0+
- ruby: '3.2'
gemfile: rails_6_1_4
# ruby 3.1 only supports rails 7.0+
- ruby: '3.1'
gemfile: rails_6_1_4
# ruby 3.0 only supports rails 6.1+
# rails 7.2 only supports ruby 3.1
- ruby: '3.0'
gemfile: rails_7_2
runs-on: ubuntu-latest
steps:
- name: Install libvips
run: sudo apt-get update && sudo apt-get -y install libvips

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set BUNDLE_GEMFILE
run: echo 'BUNDLE_GEMFILE=${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}.gemfile' >> $GITHUB_ENV
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ To run tests in root folder of gem:

* `BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test` to run for Rails 6.1.4
* `BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test` to run for Rails 7.0
* `BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test` to run for Rails 7.0
* `BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test` to run for Rails 7.1
* `BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle exec rake test` to run for Rails 7.2
* `BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test` to run for Rails main branch

Snippet to run in console:
Expand All @@ -443,10 +444,12 @@ Snippet to run in console:
BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle exec rake test
BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle exec rake test
```

Expand Down
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
BUNDLE_GEMFILE=gemfiles/rails_next.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_6_1_4.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_6_0.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_0.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_1.gemfile bundle
BUNDLE_GEMFILE=gemfiles/rails_7_2.gemfile bundle
rm *.gem
rm -fr test/dummy/log/*.log
rm -fr test/dummy/tmp/cache
Expand Down
2 changes: 2 additions & 0 deletions gemfiles/rails_6_1_4.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ source 'https://rubygems.org'

%w[activejob activemodel activestorage activesupport].each { |rails_subcomponent| gem rails_subcomponent, '~> 6.1.4' }

gem 'sqlite3', '~> 1.7'

gemspec :path => '../'
80 changes: 39 additions & 41 deletions gemfiles/rails_6_1_4.gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10,35 +10,35 @@ PATH
GEM
remote: https://rubygems.org/
specs:
actionpack (6.1.4)
actionview (= 6.1.4)
activesupport (= 6.1.4)
actionpack (6.1.7.8)
actionview (= 6.1.7.8)
activesupport (= 6.1.7.8)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (6.1.4)
activesupport (= 6.1.4)
actionview (6.1.7.8)
activesupport (= 6.1.7.8)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.1.4)
activesupport (= 6.1.4)
activejob (6.1.7.8)
activesupport (= 6.1.7.8)
globalid (>= 0.3.6)
activemodel (6.1.4)
activesupport (= 6.1.4)
activerecord (6.1.4)
activemodel (= 6.1.4)
activesupport (= 6.1.4)
activestorage (6.1.4)
actionpack (= 6.1.4)
activejob (= 6.1.4)
activerecord (= 6.1.4)
activesupport (= 6.1.4)
marcel (~> 1.0.0)
activemodel (6.1.7.8)
activesupport (= 6.1.7.8)
activerecord (6.1.7.8)
activemodel (= 6.1.7.8)
activesupport (= 6.1.7.8)
activestorage (6.1.7.8)
actionpack (= 6.1.7.8)
activejob (= 6.1.7.8)
activerecord (= 6.1.7.8)
activesupport (= 6.1.7.8)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.4)
activesupport (6.1.7.8)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -49,48 +49,47 @@ GEM
bigdecimal (3.1.8)
builder (3.3.0)
coderay (1.1.3)
combustion (1.3.7)
combustion (1.5.0)
activesupport (>= 3.0.0)
railties (>= 3.0.0)
thor (>= 0.14.6)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
docile (1.4.0)
docile (1.4.1)
erubi (1.13.0)
ffi (1.16.3)
ffi (1.17.0)
globalid (1.2.1)
activesupport (>= 6.1)
hashdiff (1.1.1)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
logger (1.6.1)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
marcel (1.0.4)
method_source (1.1.0)
mini_magick (4.12.0)
mini_magick (5.0.1)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.24.1)
minitest (5.25.1)
minitest-focus (1.4.0)
minitest (>= 4, < 6)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
public_suffix (6.0.1)
racc (1.8.0)
racc (1.8.1)
rack (2.2.9)
rack-test (2.1.0)
rack (>= 1.3)
Expand All @@ -101,40 +100,39 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (6.1.4)
actionpack (= 6.1.4)
activesupport (= 6.1.4)
railties (6.1.7.8)
actionpack (= 6.1.7.8)
activesupport (= 6.1.7.8)
method_source
rake (>= 0.13)
rake (>= 12.2)
thor (~> 1.0)
rake (13.2.1)
rexml (3.3.8)
ruby-vips (2.2.1)
ruby-vips (2.2.2)
ffi (~> 1.12)
logger
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
sqlite3 (1.7.3-arm64-darwin)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
thor (1.3.1)
thor (1.3.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
webmock (3.24.0)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
zeitwerk (2.6.16)
zeitwerk (2.6.18)

PLATFORMS
arm64-darwin
ruby
x86_64-darwin-19
x86_64-linux

DEPENDENCIES
Expand All @@ -150,8 +148,8 @@ DEPENDENCIES
pry
ruby-vips (>= 2.1.0)
simplecov
sqlite3
sqlite3 (~> 1.7)
webmock (>= 3)

BUNDLED WITH
2.5.6
2.4.11
2 changes: 2 additions & 0 deletions gemfiles/rails_7_0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ source 'https://rubygems.org'

%w[activejob activemodel activestorage activesupport].each { |rails_subcomponent| gem rails_subcomponent, '~> 7.0.0' }

gem 'sqlite3', '~> 1.7'

gemspec :path => '../'
Loading

0 comments on commit 0de9722

Please sign in to comment.