Skip to content

Commit

Permalink
Merge branch 'master' into v4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Oliver Jahner committed Aug 20, 2024
2 parents 6b53800 + 5f55e85 commit 5f9290b
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 18 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:

strategy:
matrix:
ruby-version: [3.3.4, 3.2.5, 3.1.6]
ruby-version: [3.1.6, 3.2.5, 3.3.4]
redis-version: [4, 5]
rails-version: [6.1.7.8, 7.0.8.4, 7.1.3.4]

steps:
- uses: actions/checkout@v3
Expand All @@ -35,22 +36,22 @@ jobs:
- name: Start required services
run: docker compose up -d

- name: Install gems
run: bundle install && bundle exec appraisal install
- name: Generate appraisal files
run: bundle install && bundle exec appraisal generate

- name: Compile and test beetle go binary
run: make && make test

- name: Run beetle gem tests
run: bundle exec rake test
- name: Install gems and run beetle gem tests
run: bundle install && bundle exec rake test
env:
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-version }}.gemfile
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-version }}_rails_${{ matrix.rails-version }}.gemfile
MINITEST_REPORTER: SpecReporter

- name: Run beetle failover tests
run: bundle exec cucumber --fail-fast || (tail -n 100 tmp/*.{log,output}; false)
env:
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-version }}.gemfile
BUNDLE_GEMFILE: gemfiles/redis_${{ matrix.redis-version }}_rails_${{ matrix.rails-version }}.gemfile

- name: Stop services
run: docker compose down
Expand Down
25 changes: 19 additions & 6 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
appraise "redis-4" do
gem "redis", "~> 4.0"
end
appraise "redis-5" do
gem "redis", "~> 5.0"
gem "hiredis-client"
# keep the same versions in .github/workflows/build.yml
rails_versions = [
"6.1.7.8",
"7.0.8.4",
"7.1.3.4",
"7.2.0"
]
rails_versions.each do |rails_version|
appraise "redis_4_rails_#{rails_version}" do
gem "redis", "~> 4.0"
gem "activerecord", rails_version
gem "activesupport", rails_version
end
appraise "redis_5_rails_#{rails_version}" do
gem "redis", "~> 5.0"
gem "hiredis-client"
gem "activerecord", rails_version
gem "activesupport", rails_version
end
end
3 changes: 0 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,3 @@ gemspec

gem "hiredis-client"
# gem 'bunny', '=0.7.10', :path => "#{ENV['HOME']}/src/bunny"

# Use patched appraisal gem until it is fixed upstream.
gem "appraisal", git: "https://github.com/toy/appraisal.git", ref: "55334f67f96448c2209648a20ccaeb3800a6ab0f"
4 changes: 2 additions & 2 deletions beetle.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Gem::Specification.new do |s|
s.add_runtime_dependency "amqp", "= 1.8.0"
s.add_runtime_dependency "activesupport", ">= 2.3.4"

s.add_development_dependency "activerecord", "~> 5.0"
s.add_development_dependency "activerecord", ">= 6.1"
s.add_development_dependency "cucumber", "~> 8.0.0"
s.add_development_dependency "daemon_controller", "~> 1.2.0"
s.add_development_dependency "daemons", ">= 1.2.0"
Expand All @@ -49,5 +49,5 @@ Gem::Specification.new do |s|
s.add_development_dependency "redcarpet"
s.add_development_dependency "github-markup"
s.add_development_dependency "byebug"
s.add_development_dependency "appraisal"
s.add_development_dependency "appraisal", ">= 2.5.0"
end

0 comments on commit 5f9290b

Please sign in to comment.