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

Add support for sidekiq 8 #133

Merged
merged 2 commits into from
Mar 10, 2025
Merged
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
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ jobs:
fail-fast: false
matrix:
ruby-version: ["3.3", "3.2", "3.1"]
sidekiq-version: ["~> 6.5", "~> 7"]
with-rackup: [true, false]
sidekiq-version: ["~> 6.5", "~> 7", "~> 8"]
exclude:
- sidekiq-version: "~> 8"
ruby-version: "3.1"
# Service containers to run with `runner-job`
services:
# Label used to access the service container
Expand All @@ -54,12 +56,10 @@ jobs:
cache-version: 1
env:
SIDEKIQ_VERSION_RANGE: ${{ matrix.sidekiq-version }}
WITH_RACKUP: ${{ matrix.with-rackup }}
- name: Run tests
run: bundle exec rspec --force-color
env:
SIDEKIQ_VERSION_RANGE: ${{ matrix.sidekiq-version }}
WITH_RACKUP: ${{ matrix.with-rackup }}
- name: Add coverage report
uses: insightsengineering/coverage-action@v2
# TODO: Add coverage merging from different test runs
Expand Down
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
# Specify your gem's dependencies in sidekiq_alive.gemspec
gemspec

gem "sidekiq", ENV["SIDEKIQ_VERSION_RANGE"] || "< 8"
gem "sidekiq", ENV["SIDEKIQ_VERSION_RANGE"] || "< 9"

gem "ruby-lsp", "~> 0.17.2", group: :development

Expand All @@ -18,8 +18,8 @@ group :test do
# used for testing rack based server
gem "rack-test", "~> 2.1.0"
# rackup is not compatible with sidekiq < 7 due to rack version requirement
if ENV["WITH_RACKUP"] == "true" && ["7", "8"].any? { |range| ENV["SIDEKIQ_VERSION_RANGE"]&.include?(range) }
gem "rackup", "~> 2.1.0"
if ["7", "8"].any? { |range| ENV["SIDEKIQ_VERSION_RANGE"]&.include?(range) }
gem "rackup", "~> 2.2.0"
else
gem "rack", "< 3"
gem "webrick", "< 2"
Expand Down
4 changes: 2 additions & 2 deletions sidekiq_alive.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ Gem::Specification.new do |spec|
spec.add_development_dependency("debug", "~> 1.6")
spec.add_development_dependency("rake", "~> 13.0")
spec.add_development_dependency("rspec", "~> 3.0")
spec.add_development_dependency("rspec-sidekiq", "~> 4.0")
spec.add_development_dependency("rspec-sidekiq", "~> 5.0")
spec.add_development_dependency("rubocop-shopify", "~> 2.10")
spec.add_development_dependency("solargraph", "~> 0.50.0")

spec.add_dependency("gserver", "~> 0.0.1")
spec.add_dependency("sidekiq", ">= 5", "< 8")
spec.add_dependency("sidekiq", ">= 5", "< 9")
end