Skip to content

Commit

Permalink
Add example index test to CI workflow
Browse files Browse the repository at this point in the history
Change-Id: If4b692a336b7ec17378d279ecf1149461672826b
  • Loading branch information
kupietz authored and Akron committed Feb 22, 2024
1 parent 18aff55 commit 745c130
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/ci_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Build index
run: |
mkdir index
docker run -u root --rm -v ${PWD}:/data:z korap/kustvakt Krill-Indexer.jar -c /kustvakt/kustvakt-lite.conf -i /data/json -o /data/index/
INDEX=./index docker run -u root --rm -v ${PWD}:/data:z korap/kustvakt Krill-Indexer.jar -c /kustvakt/kustvakt-lite.conf -i /data/json -o /data/index/
- name: Start KorAP - lite
run: INDEX=./index docker-compose -p korap --profile=lite up -d
- name: Wait until KorAP is up and running
Expand Down Expand Up @@ -71,3 +71,21 @@ jobs:

- name: Stop KorAP
run: docker-compose -p korap --profile=full stop

- name: Start KorAP with example index
run: INDEX='example-index' docker-compose -p korap-example-index --profile=example --profile=lite up -d
- name: Wait until KorAP with example index is up and running
run: count=0; while test $count -lt 25 && ! docker-compose -p korap-example-index logs | grep -E "Listening at.*:64543"; do count=$((count+1)); echo "waiting ${count}s"; sleep 1; done; sleep 10
- name: Test that API delivers some search hits on example index
run: test $(curl --silent 'http://localhost:64543/api/v1.0/search?q=%5Btt%2Fl%3Dgut+%26+tt%2Fp%3DADJD%5D&ql=poliqarp' | jq '.matches | length') -gt 10
- name: Test that UI delivers some search hits on example index
run: test $(curl --silent 'http://localhost:64543?q=%5Btt%2Fl%3Dgut+%26+tt%2Fp%3DADJD%5D&ql=poliqarp' | grep -c snippet) -gt 10
- name: Run end-to-end tests on example index
working-directory: ./KorAP-E2E-Tests
env:
KORAP_LOGIN: ""
KORAP_QUERIES: "[corenlp/p=VAFIN][]{2}[marmot/m=number:sg][opennlp/p=PPER][tt/l=er][tt/p=ADV]"
run: xvfb-run --auto-servernum npm test

- name: Stop KorAP
run: docker-compose -p korap-example-index --profile=lite --profile=example stop

0 comments on commit 745c130

Please sign in to comment.