Skip to content

Commit

Permalink
Adjust path
Browse files Browse the repository at this point in the history
  • Loading branch information
bbpennel committed Jan 27, 2025
1 parent 357fa32 commit aa9aa84
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 41 deletions.
97 changes: 58 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,48 +125,67 @@ jobs:
psql -c 'create database hyrax_test with owner hyrax;'
- name: Create ConfigSet Directory
run: docker exec solr_container bash -c "mkdir -p /var/solr/configsets/hy-c/conf"

- name: Copy Solr Config into container
run: docker cp ./solr/config solr_container:/opt/solr/server/solr/configsets/hy-c
run: docker cp ./solr/config/. solr_container:/var/solr/configsets/hy-c/conf

- name: List Solr Config Directory
run: docker exec solr_container bash -c "ls -la /var/solr/configsets/hy-c/conf"

- name: List libs
run: docker exec solr_container bash -c "ls -la /opt/solr/contrib/analysis-extras/lib"

- name: Debug Classpath
run: docker exec solr_container bash -c 'echo $(find /opt/solr/ -name "*.jar" | tr "\n" ":")'
continue-on-error: true

- name: Create Solr core
run: docker exec solr_container solr create_core -c hydra-test -d hy-c
run: docker exec solr_container solr create_core -c hydra-test -d /var/solr/configsets/hy-c
continue-on-error: true

- name: Fetch Solr container logs
run: docker logs $(docker ps -q -f ancestor=solr:9)

- name: Wait for Solr to start
run: |
for i in {1..30}; do
curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"' && break
echo "Waiting for Solr to initialize..."
sleep 2
done
if ! curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"'; then
echo "Solr did not initialize in time"
exit 1
fi
- name: Run rspec tests
run: bundle exec rspec
env:
REDIS_URL: redis://redis
POSTGRES_USER: hyrax
POSTGRES_PASSWORD: password
TMPDIR: /tmp

- uses: actions/upload-artifact@v4
with:
name: test-coverage
path: coverage

- uses: actions/upload-artifact@v4
with:
name: test-coverage-report
path: coverage/coverage.json

- name: Report to CodeClimate
uses: paambaati/[email protected]
with:
debug: false
coverageLocations: |
${{github.workspace}}/coverage/coverage.json:simplecov
continue-on-error: true

- name: Dump Solr Logs
run: docker exec solr_container cat /var/solr/logs/solr.log
continue-on-error: true

# - name: Wait for Solr to start
# run: |
# for i in {1..30}; do
# curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"' && break
# echo "Waiting for Solr to initialize..."
# sleep 2
# done
# if ! curl -s http://127.0.0.1:8983/solr/admin/cores?action=STATUS | grep -q '"hydra-test"'; then
# echo "Solr did not initialize in time"
# exit 1
# fi

# - name: Run rspec tests
# run: bundle exec rspec
# env:
# REDIS_URL: redis://redis
# POSTGRES_USER: hyrax
# POSTGRES_PASSWORD: password
# TMPDIR: /tmp

# - uses: actions/upload-artifact@v4
# with:
# name: test-coverage
# path: coverage

# - uses: actions/upload-artifact@v4
# with:
# name: test-coverage-report
# path: coverage/coverage.json

# - name: Report to CodeClimate
# uses: paambaati/[email protected]
# with:
# debug: false
# coverageLocations: |
# ${{github.workspace}}/coverage/coverage.json:simplecov
4 changes: 2 additions & 2 deletions solr/config/schema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@

<fieldType name="text" class="solr.TextField" omitNorms="false">
<analyzer>
<tokenizer class="solr.ICUTokenizerFactory"/>
<tokenizer class="org.apache.lucene.analysis.icu.segmentation.ICUTokenizerFactory"/>
<filter class="org.apache.lucene.analysis.icu.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
<filter class="solr.TrimFilterFactory"/>
</analyzer>
Expand Down Expand Up @@ -143,7 +143,7 @@
<!-- A text field with defaults appropriate for English -->
<fieldType name="text_en" class="solr.TextField" positionIncrementGap="100">
<analyzer>
<tokenizer class="solr.ICUTokenizerFactory"/>
<tokenizer class="org.apache.lucene.analysis.icu.segmentation.ICUTokenizerFactory"/>
<filter class="org.apache.lucene.analysis.icu.ICUFoldingFilterFactory"/> <!-- NFKC, case folding, diacritics removed -->
<filter class="solr.EnglishPossessiveFilterFactory"/>
<!-- EnglishMinimalStemFilterFactory is less aggressive than PorterStemFilterFactory: -->
Expand Down

0 comments on commit aa9aa84

Please sign in to comment.