Skip to content

Commit

Permalink
matrix cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
onyxraven committed Oct 15, 2024
1 parent bd29b79 commit e837444
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 16 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,32 @@ jobs:
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- '6379:6379'
- "6379:6379"
strategy:
fail-fast: false
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
gemfile: ['Gemfile', 'Gemfile.redis3', 'Gemfile.redis4']
ruby-version:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
resque-version:
- "~> 1.23"
redis-version:
- "~> 3.3"
- "~> 4.8"
resque-scheduler-version:
- "4.3.0"
- "< 4.9.0"
- "~> 4.9"
exclude:
# resque-scheduler (= 4.3.0) depends on redis (~> 3.3)
- redis-version: "~> 4.8"
resque-scheduler-version: "4.3.0"
env:
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
REDIS_VERSION: "${{ matrix.redis-version }}"
RESQUE: "${{ matrix.resque-version }}"
RESQUE_SCHEDULER_VERSION: "${{ matrix.resque-scheduler-version }}"
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
Expand Down
36 changes: 36 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,38 @@
source 'https://rubygems.org'

case resque_version = ENV.fetch('RESQUE', 'latest')
when 'master'
gem 'resque', git: 'https://github.com/resque/resque'
when /^git:/, /^https:/
gem 'resque', git: resque_version
when 'latest'
gem 'resque'
else
gem 'resque', resque_version
end

case redis_version = ENV.fetch('REDIS_VERSION', 'latest')
when 'master'
gem 'redis', git: 'https://github.com/redis/redis-rb'
when /^git:/, /^https:/
gem 'redis', git: redis_version
when 'latest'
gem 'redis'
else
gem 'redis', redis_version
end

case resque_scheduler_version = ENV.fetch('RESQUE_SCHEDULER_VERSION', 'none')
when 'master'
gem 'resque-scheduler', git: 'https://github.com/resque/resque-scheduler'
when /^git:/, /^https:/
gem 'resque-scheduler', git: resque_scheduler_version
when 'latest'
gem 'resque-scheduler'
when 'none'
#noop
else
gem 'resque-scheduler', resque_scheduler_version
end

gemspec
5 changes: 0 additions & 5 deletions Gemfile.redis3

This file was deleted.

5 changes: 0 additions & 5 deletions Gemfile.redis4

This file was deleted.

6 changes: 6 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ Rake::TestTask.new(:test) do |task|
task.verbose = true
end

desc "Run resque-scheduler integration tests."
Rake::TestTask.new(:test_integration_resque_scheduler) do |task|
task.test_files = FileList["test/integration/resque-scheduler/*_test.rb"]
task.verbose = true
end

desc "Build Yardoc documentation."
YARD::Rake::YardocTask.new :yardoc do |t|
t.files = ["lib/**/*.rb"]
Expand Down
2 changes: 1 addition & 1 deletion test/lock_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_resque_plugin_lint
end

def test_version
major, minor, _patch = Resque::Version.split(".")
major, minor, _patch = Resque::VERSION.split(".")
assert_equal 1, major.to_i
assert minor.to_i >= 7
end
Expand Down

0 comments on commit e837444

Please sign in to comment.