Skip to content

Commit

Permalink
Testing for Ruby 3.3 and Rails 7.2 (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
randalldfloyd authored Oct 1, 2024
1 parent af43a6f commit 48ec319
Show file tree
Hide file tree
Showing 18 changed files with 1,916 additions and 81 deletions.
189 changes: 109 additions & 80 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,42 @@ jobs:
bundler_version:
type: string
default: 2.3.10
executor:
name: 'samvera/ruby_fcrepo_solr_redis_postgres'
ruby_version: << parameters.ruby_version >>
solr_config_path:
type: string
default: solr/conf
ruby_type:
type: string
default: 'ruby'
solr_port:
type: string
default: '8985'
fcrepo_version:
type: string
default: "4.7.5"
solr_version:
type: string
default: "9"
docker:
- image: cimg/<< parameters.ruby_type >>:<< parameters.ruby_version >>-browsers
- image: samvera/fcrepo4:<< parameters.fcrepo_version >>
environment:
CATALINA_OPTS: "-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC"
- image: zookeeper:3.9
environment:
ZOO_ADMINSERVER_ENABLED: false
- image: solr:<< parameters.solr_version >>
environment:
VERBOSE: yes
SECURITY_JSON: '{"authentication":{"blockUnknown": false, "class":"solr.BasicAuthPlugin", "credentials":{"solr":"IV0EHq1OnNrj6gvRCwvFwTrZ1+z1oBbnQdiVC3otuq0= Ndd7LKvVBAaZIF0QAVi1ekCfAJXr1GGfLtRUXhgrF8c="}, "realm":"My Solr users", "forwardCredentials": false}, "authorization":{ "class":"solr.RuleBasedAuthorizationPlugin", "permissions":[{"name":"security-edit", "role":"admin"}], "user-role":{"solr":"admin"}}}'
command: sh -c "server/scripts/cloud-scripts/zkcli.sh -zkhost localhost:2181 -cmd put /security.json \"${SECURITY_JSON}\" && solr-fg -cloud -noprompt -p << parameters.solr_port >> -z localhost:2181"
environment:
BUNDLE_PATH: vendor/bundle
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
RAILS_ENV: test
RACK_ENV: test
FCREPO_TEST_PORT: 8080
SPEC_OPTS: --profile 10 --format RspecJunitFormatter --out /tmp/test-results/rspec.xml --format progress
RAILS_VERSION: << parameters.rails_version >>
steps:
- samvera/cached_checkout
Expand All @@ -27,7 +59,13 @@ jobs:
bundler_version: << parameters.bundler_version >>
project: << parameters.project >>

- samvera/install_solr_core
- run:
name: Install solr core
command: |
cd << parameters.solr_config_path >>
zip -1 -r solr_conf.zip ./*
curl -H "Content-type:application/octet-stream" --data-binary @solr_conf.zip "http://solr:SolrRocks@127.0.0.1:8985/solr/admin/configs?action=UPLOAD&name=solrconfig"
curl "http://solr:SolrRocks@127.0.0.1:8985/solr/admin/collections?action=CREATE&name=hydra-test&numShards=1&collection.configName=solrconfig"
- samvera/rubocop

Expand All @@ -36,54 +74,50 @@ jobs:
workflows:
ci:
jobs:
# Ruby 3.3 releases
- bundle_lint_test:
name: ruby3-2_rails7-0
ruby_version: 3.2.0
rails_version: 7.0.4.1
name: ruby3-3_rails7-2
ruby_version: 3.3.4
rails_version: 7.2.0
- bundle_lint_test:
name: ruby3-2_rails6-1
ruby_version: 3.2.0
rails_version: 6.1.7.1
name: ruby3-3_rails7-1
ruby_version: 3.3.4
rails_version: 7.1.3.4
- bundle_lint_test:
name: ruby3-2_rails6-0
ruby_version: 3.2.0
rails_version: 6.0.6.1
name: ruby3-3_rails7-0
ruby_version: 3.3.4
rails_version: 7.0.8.4
- bundle_lint_test:
name: ruby3-1_rails7-0
ruby_version: 3.1.3
rails_version: 7.0.4.1
- bundle_lint_test:
name: ruby3-1_rails6-1
ruby_version: 3.1.3
rails_version: 6.1.7.1
name: ruby3-3_rails6-1
ruby_version: 3.3.4
rails_version: 6.1.7.8
# Ruby 3.2 releases
- bundle_lint_test:
name: ruby3-1_rails6-0
ruby_version: 3.1.3
rails_version: 6.0.6.1
name: ruby3-2_rails7-1
ruby_version: 3.2.5
rails_version: 7.1.3.4
- bundle_lint_test:
name: ruby3-0_rails7-0
ruby_version: 3.0.5
rails_version: 7.0.4.1
- bundle_lint_test:
name: ruby3-0_rails6-1
ruby_version: 3.0.5
rails_version: 6.1.7.1
name: ruby3-2_rails7-0
ruby_version: 3.2.5
rails_version: 7.0.8.4
- bundle_lint_test:
name: ruby3-0_rails6-0
ruby_version: 3.0.5
rails_version: 6.0.6.1
name: ruby3-2_rails6-1
ruby_version: 3.2.5
rails_version: 6.1.7.8
# Ruby 3.1 releases
- bundle_lint_test:
name: ruby2-7_rails6-1
ruby_version: 2.7.7
rails_version: 6.1.7.1
name: ruby3-1_rails7-1
ruby_version: 3.1.6
rails_version: 7.1.3.4
- bundle_lint_test:
name: ruby2-7_rails6-0
ruby_version: 2.7.7
rails_version: 6.0.6.1
name: ruby3-1_rails7-0
ruby_version: 3.1.6
rails_version: 7.0.8.4
- bundle_lint_test:
name: ruby2-7_rails5-2
ruby_version: 2.7.7
rails_version: 5.2.8.1
name: ruby3-1_rails6-1
ruby_version: 3.1.6
rails_version: 6.1.7.8


nightly:
triggers:
Expand All @@ -94,51 +128,46 @@ workflows:
only:
- main
jobs:
# Ruby 3.3 releases
- bundle_lint_test:
name: ruby3-2_rails7-0
ruby_version: 3.2.0
rails_version: 7.0.4.1
name: ruby3-3_rails7-2
ruby_version: 3.3.4
rails_version: 7.2.0
- bundle_lint_test:
name: ruby3-2_rails6-1
ruby_version: 3.2.0
rails_version: 6.1.7.1
name: ruby3-3_rails7-1
ruby_version: 3.3.4
rails_version: 7.1.3.4
- bundle_lint_test:
name: ruby3-2_rails6-0
ruby_version: 3.2.0
rails_version: 6.0.6.1
name: ruby3-3_rails7-0
ruby_version: 3.3.4
rails_version: 7.0.8.4
- bundle_lint_test:
name: ruby3-1_rails7-0
ruby_version: 3.1.3
rails_version: 7.0.4.1
name: ruby3-3_rails6-1
ruby_version: 3.3.4
rails_version: 6.1.7.8
# Ruby 3.2 releases
- bundle_lint_test:
name: ruby3-1_rails6-1
ruby_version: 3.1.3
rails_version: 6.1.7.1
name: ruby3-2_rails7-1
ruby_version: 3.2.5
rails_version: 7.1.3.4
- bundle_lint_test:
name: ruby3-1_rails6-0
ruby_version: 3.1.3
rails_version: 6.0.6.1
- bundle_lint_test:
name: ruby3-0_rails7-0
ruby_version: 3.0.5
rails_version: 7.0.4.1
- bundle_lint_test:
name: ruby3-0_rails6-1
ruby_version: 3.0.5
rails_version: 6.1.7.1
name: ruby3-2_rails7-0
ruby_version: 3.2.5
rails_version: 7.0.8.4
- bundle_lint_test:
name: ruby3-0_rails6-0
ruby_version: 3.0.5
rails_version: 6.0.6.1
name: ruby3-2_rails6-1
ruby_version: 3.2.5
rails_version: 6.1.7.8
# Ruby 3.1 releases
- bundle_lint_test:
name: ruby2-7_rails6-1
ruby_version: 2.7.7
rails_version: 6.1.7.1
name: ruby3-1_rails7-1
ruby_version: 3.1.6
rails_version: 7.1.3.4
- bundle_lint_test:
name: ruby2-7_rails6-0
ruby_version: 2.7.7
rails_version: 6.0.6.1
name: ruby3-1_rails7-0
ruby_version: 3.1.6
rails_version: 7.0.8.4
- bundle_lint_test:
name: ruby2-7_rails5-2
ruby_version: 2.7.7
rails_version: 5.2.8.1
name: ruby3-1_rails6-1
ruby_version: 3.1.6
rails_version: 6.1.7.8
2 changes: 1 addition & 1 deletion hydra-pcdm.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']

spec.add_dependency 'active-fedora', '>= 10', '< 15'
spec.add_dependency 'active-fedora', '>= 10'
spec.add_dependency 'mime-types', '>= 1'
spec.add_dependency 'rdf-vocab'

Expand Down
3 changes: 3 additions & 0 deletions solr/conf/_rest_managed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"initArgs":{},
"managedList":[]}
31 changes: 31 additions & 0 deletions solr/conf/admin-extra.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- The content of this page will be statically included into the top
of the admin page. Uncomment this as an example to see there the content
will show up.
<hr>
<i>This line will appear before the first table</i>
<tr>
<td colspan="2">
This row will be appended to the end of the first table
</td>
</tr>
<hr>
-->
36 changes: 36 additions & 0 deletions solr/conf/elevate.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<!-- If this file is found in the config directory, it will only be
loaded once at startup. If it is found in Solr's data
directory, it will be re-loaded every commit.
-->

<elevate>
<query text="foo bar">
<doc id="1" />
<doc id="2" />
<doc id="3" />
</query>

<query text="ipod">
<doc id="MA147LL/A" /> <!-- put the actual ipod at the top -->
<doc id="IW-02" exclude="true" /> <!-- exclude this cable -->
</query>

</elevate>
Loading

0 comments on commit 48ec319

Please sign in to comment.