Skip to content

Commit

Permalink
Run CI on various versions of solr.
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeer committed Sep 25, 2024
1 parent 4573985 commit 8118de0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ jobs:
- '3.2.5'
- '3.3.4'
- jruby-9.4.8.0
solr_version: ['']
include:
- ruby: '3.3.4'
solr_version: ['8.11.4']
- ruby: '3.3.4'
solr_version: ['9.6.1']
env:
SOLR_WRAPPER_SOLR_VERSION: ${{ matrix.solr_version }}
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
Expand Down
7 changes: 6 additions & 1 deletion lib/solr_wrapper/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,12 @@ def instance_dir

def version
@version ||= begin
config_version = options.fetch(:version, SolrWrapper.default_instance_options[:version])
config_version = if ENV['SOLR_WRAPPER_SOLR_VERSION'].nil? || ENV['SOLR_WRAPPER_SOLR_VERSION'].empty?
options.fetch(:version, SolrWrapper.default_instance_options[:version]))
else
ENV['SOLR_WRAPPER_SOLR_VERSION']
end

if config_version == 'latest'
fetch_latest_version
else
Expand Down
2 changes: 2 additions & 0 deletions spec/lib/solr_wrapper/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@
end

describe '#version' do
skip if ENV['SOLR_WRAPPER_SOLR_VERSION']

context 'when it is a version number' do
let(:options) { { version: 'x.y.z' } }

Expand Down

0 comments on commit 8118de0

Please sign in to comment.