BXC-4701 - Update clients/tests to solr 9 #1979
Workflow file for this run
This file contains 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
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Build | |
on: | |
push: | |
branches: [main, '*-development'] | |
pull_request: | |
branches: [main, '*-development'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
redis: | |
image: redis:6 | |
ports: | |
- 46380:6379 | |
fedora: | |
image: fcrepo/fcrepo:5.1.1 | |
ports: | |
- 48085:8080 | |
volumes: | |
- ${{ github.workspace }}/it_config:/config | |
- /tmp/boxc_test_storage:/tmp/boxc_test_storage | |
env: | |
CATALINA_OPTS: "-Djava.awt.headless=true -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -Dfcrepo.external.content.allowed=/config/allowed_external_paths.txt" | |
solr: | |
image: solr:9 | |
ports: | |
- "48983:8983" | |
volumes: | |
- /tmp/solr-config:/solr_config | |
steps: | |
- name: Change permissions of /tmp/boxc_test_storage | |
run: sudo chmod 2777 /tmp/boxc_test_storage | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Get Container ID of fedora service | |
id: get_container_id | |
run: | | |
CONTAINER_ID=$(docker ps --format "{{.ID}}" -f "ancestor=fcrepo/fcrepo:5.1.1") | |
echo "CONTAINER_ID=$CONTAINER_ID" >> $GITHUB_ENV | |
- name: Restart fedora now that the repository has been checked out so config files are available | |
run: docker restart ${{ env.CONTAINER_ID }} | |
- name: Run Fuseki container as command to pass in extra dataset name argument | |
run: | | |
docker run -d --rm -p 43030:3030 atomgraph/fuseki --mem /test | |
# Need to copy the config is outside of the source path, otherwise it produces permission conflicts | |
- name: Copy Solr Config into container | |
run: sudo cp -r ${{ github.workspace }}/etc/solr-config /tmp/solr-config/config | |
- name: Change permissions of /tmp/solr-config | |
run: sudo chmod -R 2777 /tmp/solr-config | |
- name: Wait for Solr to start | |
run: | | |
until curl -s http://localhost:48983/solr; do | |
echo "Waiting for Solr to start..." | |
sleep 5 | |
done | |
- name: Create Solr Core | |
run: curl "http://localhost:48983/solr/admin/cores?action=CREATE&name=access&instanceDir=/solr_config/config&config=solrconfig.xml&schema=schema.xml" | |
- name: Probe Solr core | |
run: curl -s "http://localhost:48983/solr/access/select?q=*" | |
# | |
# - name: Checkout submodules | |
# run: git submodule update --init --recursive | |
# | |
# - name: Set up JDK 11 | |
# uses: actions/setup-java@v1 | |
# with: | |
# java-version: 11 | |
# | |
# - name: Cache Maven packages | |
# uses: actions/cache@v2 | |
# with: | |
# path: ~/.m2 | |
# key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
# restore-keys: ${{ runner.os }}-m2 | |
# - name: Build with Maven | |
# run: mvn -B -U -pl '!integration' clean install -DskipTests | |
# - name: Set up nodejs | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: '16' | |
# - name: Cache npm modules | |
# uses: actions/cache@v2 | |
# with: | |
# path: ~/.npm | |
# key: v1-npm-deps-${{ hashFiles('**/package-lock.json') }} | |
# restore-keys: v1-npm-deps- | |
# - run: npm --prefix static/js/vue-cdr-access install | |
# - run: npm --prefix static/js/admin/vue-permissions-editor install | |
# | |
# - run: npm install -g [email protected] | |
# - run: npm --prefix static/js/vue-cdr-access run test | |
# - run: npm --prefix static/js/admin/vue-permissions-editor run test | |
# - name: Report to CodeClimate | |
# uses: paambaati/[email protected] | |
# env: | |
# CC_TEST_REPORTER_ID: ${{secrets.CC_TEST_REPORTER_ID}} | |
# JACOCO_SOURCE_PATH: "${{github.workspace}}/auth-api/src/main/java ${{github.workspace}}/auth-fcrepo/src/main/java ${{github.workspace}}/common-utils/src/main/java ${{github.workspace}}/deposit-app/src/main/java ${{github.workspace}}/deposit-utils/src/main/java ${{github.workspace}}/fcrepo-utils/src/main/java ${{github.workspace}}/indexing-solr/src/main/java ${{github.workspace}}/integration/src/main/java ${{github.workspace}}/model-api/src/main/java ${{github.workspace}}/model-fcrepo/src/main/java ${{github.workspace}}/operations/src/main/java ${{github.workspace}}/operations-jms/src/main/java ${{github.workspace}}/persistence/src/main/java ${{github.workspace}}/persistence-api/src/main/java ${{github.workspace}}/search-api/src/main/java ${{github.workspace}}/search-solr/src/main/java ${{github.workspace}}/services-camel-app/src/main/java ${{github.workspace}}/web-access-app/src/main/java ${{github.workspace}}/web-access-war/src/main/java ${{github.workspace}}/web-admin-app/src/main/java ${{github.workspace}}/web-common/src/main/java ${{github.workspace}}/web-services-app/src/main/java ${{github.workspace}}/web-sword/src/main/java ${{github.workspace}}/clamav-java/src/main/java" | |
# with: | |
# coverageCommand: mvn -pl integration verify | |
# coverageLocations: | | |
# ${{github.workspace}}/**/target/site/jacoco/jacoco.xml:jacoco | |
# ${{github.workspace}}/**/target/site/jacoco-it/jacoco.xml:jacoco | |
# ${{github.workspace}}/static/js/vue-cdr-access/coverage/lcov.info:lcov | |
# ${{github.workspace}}/static/js/admin/vue-permissions-editor/coverage/lcov.info:lcov | |
# | |
# - name: View fedora service logs | |
# if: always() | |
# run: | | |
# docker logs ${{ env.CONTAINER_ID }} |