-
Notifications
You must be signed in to change notification settings - Fork 342
Test pysolr against multiple versions of Solr, fixes #223 #227
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
Open
jnovinger
wants to merge
9
commits into
django-haystack:master
Choose a base branch
from
jnovinger:test/multiple-solr-versions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
7d3042b
Implement Solr 5.x-7.x testing via Docker
jnovinger 8cc54ba
Remove comments from schema.xml/solrconfig.xml
jnovinger 4dd6ccc
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 31c9ebc
Disable spellcheck in XML files
jnovinger e05b4c9
Merge branch 'master' into test/multiple-solr-versions
cclauss 9a7fa17
Update pyproject.toml: codespell --skip="./.*,*.xml"
cclauss 5e24b43
Merge branch 'master' into test/multiple-solr-versions
cclauss 98c77c0
Delete .travis.yml
cclauss 31bdf68
Merge branch 'master' into test/multiple-solr-versions
cclauss File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
sudo: required | ||
language: python | ||
python: | ||
- "2.7" | ||
- "3.3" | ||
- "3.4" | ||
- "3.5" | ||
- "3.6" | ||
- "pypy" | ||
|
||
cache: | ||
apt: true | ||
pip: true | ||
directories: | ||
- $HOME/download-cache | ||
|
||
env: | ||
- SOLR_VERSION="4.10.4" SOLRCLOUD=false | ||
- SOLR_VERSION="4.10.4" SOLRCLOUD=true | ||
- SOLR_VERSION="5.5" SOLRCLOUD=false | ||
- SOLR_VERSION="5.5" SOLRCLOUD=true | ||
- SOLR_VERSION="6.6" SOLRCLOUD=false | ||
- SOLR_VERSION="6.6" SOLRCLOUD=true | ||
- SOLR_VERSION="7.1" SOLRCLOUD=false | ||
- SOLR_VERSION="7.1" SOLRCLOUD=true | ||
|
||
matrix: | ||
allow_failures: | ||
- env: SOLR_VERSION="5.5" SOLRCLOUD=true | ||
- env: SOLR_VERSION="6.6" SOLRCLOUD=true | ||
- env: SOLR_VERSION="7.1" SOLRCLOUD=false | ||
- env: SOLR_VERSION="7.1" SOLRCLOUD=true | ||
- python: 'pypy' | ||
|
||
services: | ||
- docker | ||
|
||
addons: | ||
apt_packages: | ||
- default-jdk | ||
|
||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get install docker-ce | ||
|
||
install: | ||
- "pip install 'requests>2'" | ||
- "pip install ." | ||
- 'if [[ $TRAVIS_PYTHON_VERSION == "2.7" ]]; then travis_retry pip install faulthandler; fi' | ||
- 'if [[ "${SOLRCLOUD:-false}" == "true" ]]; then pip install -e .[solrcloud]; fi' | ||
|
||
script: | ||
- python run-tests.py | ||
|
||
notifications: | ||
# irc: "irc.freenode.org#pysolr" | ||
email: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: '2' | ||
|
||
services: | ||
solr-base: | ||
restart: "no" | ||
build: | ||
context: ./docker | ||
ports: | ||
- "8983:8983" | ||
|
||
solr-5.5: | ||
extends: solr-base | ||
build: | ||
args: | ||
PY_SOLR_VERSION: 5.5 | ||
|
||
solr-6.6: | ||
extends: solr-base | ||
build: | ||
args: | ||
PY_SOLR_VERSION: 6.6 | ||
|
||
solr-7.0: | ||
extends: solr-base | ||
build: | ||
args: | ||
PY_SOLR_VERSION: 7.0 | ||
|
||
solr-7.1: | ||
extends: solr-base | ||
build: | ||
args: | ||
PY_SOLR_VERSION: 7.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
ARG PY_SOLR_VERSION | ||
FROM solr:${PY_SOLR_VERSION} | ||
|
||
ARG PY_SOLR_VERSION | ||
|
||
ENV CORES_DIR /opt/solr/server/solr | ||
|
||
USER root | ||
COPY ./cores $CORES_DIR | ||
|
||
# rewrite solrconfig.xml luceneMatchVersion to match current version and re-chown | ||
RUN perl -p -i -e "s|<luceneMatchVersion>.*</luceneMatchVersion>|<luceneMatchVersion>${SOLR_VERSION}</luceneMatchVersion>|"g ${CORES_DIR}/core0/conf/solrconfig.xml && \ | ||
chown -R solr:solr $CORES_DIR | ||
|
||
USER solr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version="1.0" ?> | ||
<!-- | ||
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. | ||
--> | ||
|
||
<!-- Example exchange rates file for CurrencyField type named "currency" in example schema --> | ||
|
||
<currencyConfig version="1.0"> | ||
<rates> | ||
<!-- Updated from http://www.exchangerate.com/ at 2011-09-27 --> | ||
<rate from="USD" to="ARS" rate="4.333871" comment="ARGENTINA Peso" /> | ||
<rate from="USD" to="AUD" rate="1.025768" comment="AUSTRALIA Dollar" /> | ||
<rate from="USD" to="EUR" rate="0.743676" comment="European Euro" /> | ||
<rate from="USD" to="BRL" rate="1.881093" comment="BRAZIL Real" /> | ||
<rate from="USD" to="CAD" rate="1.030815" comment="CANADA Dollar" /> | ||
<rate from="USD" to="CLP" rate="519.0996" comment="CHILE Peso" /> | ||
<rate from="USD" to="CNY" rate="6.387310" comment="CHINA Yuan" /> | ||
<rate from="USD" to="CZK" rate="18.47134" comment="CZECH REP. Koruna" /> | ||
<rate from="USD" to="DKK" rate="5.515436" comment="DENMARK Krone" /> | ||
<rate from="USD" to="HKD" rate="7.801922" comment="HONG KONG Dollar" /> | ||
<rate from="USD" to="HUF" rate="215.6169" comment="HUNGARY Forint" /> | ||
<rate from="USD" to="ISK" rate="118.1280" comment="ICELAND Krona" /> | ||
<rate from="USD" to="INR" rate="49.49088" comment="INDIA Rupee" /> | ||
<rate from="USD" to="XDR" rate="0.641358" comment="INTNL MON. FUND SDR" /> | ||
<rate from="USD" to="ILS" rate="3.709739" comment="ISRAEL Sheqel" /> | ||
<rate from="USD" to="JPY" rate="76.32419" comment="JAPAN Yen" /> | ||
<rate from="USD" to="KRW" rate="1169.173" comment="KOREA (SOUTH) Won" /> | ||
<rate from="USD" to="KWD" rate="0.275142" comment="KUWAIT Dinar" /> | ||
<rate from="USD" to="MXN" rate="13.85895" comment="MEXICO Peso" /> | ||
<rate from="USD" to="NZD" rate="1.285159" comment="NEW ZEALAND Dollar" /> | ||
<rate from="USD" to="NOK" rate="5.859035" comment="NORWAY Krone" /> | ||
<rate from="USD" to="PKR" rate="87.57007" comment="PAKISTAN Rupee" /> | ||
<rate from="USD" to="PEN" rate="2.730683" comment="PERU Sol" /> | ||
<rate from="USD" to="PHP" rate="43.62039" comment="PHILIPPINES Peso" /> | ||
<rate from="USD" to="PLN" rate="3.310139" comment="POLAND Zloty" /> | ||
<rate from="USD" to="RON" rate="3.100932" comment="ROMANIA Leu" /> | ||
<rate from="USD" to="RUB" rate="32.14663" comment="RUSSIA Ruble" /> | ||
<rate from="USD" to="SAR" rate="3.750465" comment="SAUDI ARABIA Riyal" /> | ||
<rate from="USD" to="SGD" rate="1.299352" comment="SINGAPORE Dollar" /> | ||
<rate from="USD" to="ZAR" rate="8.329761" comment="SOUTH AFRICA Rand" /> | ||
<rate from="USD" to="SEK" rate="6.883442" comment="SWEDEN Krona" /> | ||
<rate from="USD" to="CHF" rate="0.906035" comment="SWITZERLAND Franc" /> | ||
<rate from="USD" to="TWD" rate="30.40283" comment="TAIWAN Dollar" /> | ||
<rate from="USD" to="THB" rate="30.89487" comment="THAILAND Baht" /> | ||
<rate from="USD" to="AED" rate="3.672955" comment="U.A.E. Dirham" /> | ||
<rate from="USD" to="UAH" rate="7.988582" comment="UKRAINE Hryvnia" /> | ||
<rate from="USD" to="GBP" rate="0.647910" comment="UNITED KINGDOM Pound" /> | ||
|
||
<!-- Cross-rates for some common currencies --> | ||
<rate from="EUR" to="GBP" rate="0.869914" /> | ||
<rate from="EUR" to="NOK" rate="7.800095" /> | ||
<rate from="GBP" to="NOK" rate="8.966508" /> | ||
</rates> | ||
</currencyConfig> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?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. | ||
|
||
See http://wiki.apache.org/solr/QueryElevationComponent for more info | ||
|
||
--> | ||
<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> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis CI is no longer free to open source projects so we use GitHub Actions instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, figured that would be where I need to do most of the work.
Honestly, I thought I told git to remove that file during the rebase. But, perhaps it's good to have for reference until the PR is ready for re-review. It will definitely be gone by then.