Skip to content
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
16 changes: 9 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,19 @@ jobs:
ports:
# Maps port 6379 on service container to the host
- 6379:6379
strategy:
matrix:
sidekiq-version: ["7", "8"]
env:
BUNDLE_VERSION: "~> 2.1.4"
BUNDLE_VERSION: "~> 2.7.2"
BUNDLE_GEMS__CONTRIBSYS__COM: ${{ secrets.BUNDLE_GEMS__CONTRIBSYS__COM }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: actions/checkout@v5
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2.5'
ruby-version: "3.3.7"
bundler-cache: true
- name: Run tests
run: |
bundle exec rake ci:specs
- name: Install dependencies and Run tests
run: bundle exec rake test:sidekiq${{ matrix.sidekiq-version }}
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source "https://rubygems.org"

source "https://gems.contribsys.com/" do
gem "sidekiq-pro", "7.3.0"
gem "sidekiq-pro", ">= 7.3.0", "< 9"
end

gem "sidekiq", "7.3.0"
gem "sidekiq", ">= 7.3.0", "< 9"

# Specify your gem's dependencies in simplekiq.gemspec
gemspec
10 changes: 10 additions & 0 deletions Gemfile.sidekiq7
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source "https://rubygems.org"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't actually seen this "multiple gemfiles" trick before but I guess it makes sense. In my mind "multiple Gemfile.locks" seems more correct but is probably harder to manage in practice?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I think it's harder to manage and we also explicitly got rid of the Gemfile.lock before doximity@9a29f9c


source "https://gems.contribsys.com/" do
gem "sidekiq-pro", "7.3.0"
end

gem "sidekiq", "7.3.0"

# Specify your gem's dependencies in simplekiq.gemspec
gemspec
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,12 @@ This project follows semantic versioning. See https://semver.org/ for details.

After checking out the repo, run `bin/setup` to install dependencies. Note that this depends on `sidekiq-pro` which requires a [commercial license](https://sidekiq.org/products/pro.html) to install and use.

Then, run `rake ci:specs` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
Then, run `rake ci:specs` to run the tests. You can also run:
- `rake test:sidekiq8` to test against Sidekiq 8.0 (default)
- `rake test:sidekiq7` to test against Sidekiq 7.3
- `rake test:all` to test against all supported Sidekiq versions

You can also run `bin/console` for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run `bundle exec rake install`.

Expand Down
17 changes: 17 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,20 @@ FileList["tasks/*.rake"].each { |task| load task }
RSpec::Core::RakeTask.new(:spec)

task default: :spec

namespace :test do
desc "Test against Sidekiq 8.0 (default)"
task :sidekiq8 do
sh "bundle install"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you already have 7.3 installed, does this actually force 8? because 7.3 still satisfies the default gemfile?

sh "bundle exec rspec"
end

desc "Test against Sidekiq 7.3"
task :sidekiq7 do
sh "bundle install --gemfile=Gemfile.sidekiq7"
sh "bundle exec rspec"
end

desc "Test against all Sidekiq versions"
task :all => [:sidekiq8, :sidekiq7]
end
4 changes: 2 additions & 2 deletions simplekiq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "pry"
spec.add_development_dependency "standard"

spec.add_dependency "sidekiq", ">= 7.3.0"
spec.add_dependency "sidekiq-pro", "~> 7.3.0"
spec.add_dependency "sidekiq", ">= 7.3.0", "< 9.0"
spec.add_dependency "sidekiq-pro", ">= 7.3.0", "< 9.0"
end