Skip to content
Snippets Groups Projects
Commit 9cec5ea5 authored by Ubbo Veentjer's avatar Ubbo Veentjer
Browse files

Merge branch '27-fix-all-unit-tests' into 'develop'

Resolve "Fix all UNIT tests"

Closes #27

See merge request !3
parents d5adb654 c571f149
No related branches found
No related tags found
1 merge request!3Resolve "Fix all UNIT tests"
Pipeline #305427 passed
...@@ -18,7 +18,7 @@ variables: ...@@ -18,7 +18,7 @@ variables:
################### ###################
.webapp: &webapp .webapp: &webapp
image: alpine:3.14 image: alpine:3.14
stage: deploy_deb stage: deploy
script: script:
- source $VARIABLES_FILE - source $VARIABLES_FILE
- 'apk add --no-cache bash' - 'apk add --no-cache bash'
...@@ -40,9 +40,10 @@ variables: ...@@ -40,9 +40,10 @@ variables:
- crane auth login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY - crane auth login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
stages: stages:
- build_version - prepare
- deploy_java - test
- deploy_deb - build
- deploy
# Cache downloaded dependencies and plugins between builds. # Cache downloaded dependencies and plugins between builds.
# To keep cache across branches add 'key: "$CI_JOB_NAME"' # To keep cache across branches add 'key: "$CI_JOB_NAME"'
...@@ -54,7 +55,7 @@ cache: ...@@ -54,7 +55,7 @@ cache:
# Get the project version from main POM file and store it to artifact. # Get the project version from main POM file and store it to artifact.
get_version: get_version:
image: maven:3.8.3-jdk-8 image: maven:3.8.3-jdk-8
stage: build_version stage: prepare
script: script:
- 'PVERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=project.version -q -DforceStdout)' - 'PVERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=project.version -q -DforceStdout)'
- echo "export PVERSION=$PVERSION" > $VARIABLES_FILE - echo "export PVERSION=$PVERSION" > $VARIABLES_FILE
...@@ -67,13 +68,22 @@ get_version: ...@@ -67,13 +68,22 @@ get_version:
paths: paths:
- $VARIABLES_FILE - $VARIABLES_FILE
# run junit tests
test:
stage: test
image: maven:3.8.3-jdk-8
script:
- git submodule update --recursive --init
- git -C src/main/webapp/tei-stylesheets/ checkout $TEI_STYLESHEETS_VERSION
- mvn $MAVEN_OPTS $MAVEN_CLI_OPTS $MAVEN_DEPLOY_OPTS -U clean test
artifacts:
reports:
junit: target/surefire-reports/TEST-*.xml
# Build and deploy all the JARs to GWDG Nexus, and build all the DEBs and store DEBs to artifacts. # Build and deploy all the JARs to GWDG Nexus, and build all the DEBs and store DEBs to artifacts.
build_and_deploy: build_and_deploy:
image: maven:3.8.3-jdk-8 image: maven:3.8.3-jdk-8
only: stage: build
- develop
# - main
stage: deploy_java
script: script:
- source $VARIABLES_FILE - source $VARIABLES_FILE
- git submodule update --recursive --init - git submodule update --recursive --init
...@@ -89,7 +99,7 @@ build_container_image: ...@@ -89,7 +99,7 @@ build_container_image:
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
entrypoint: [""] entrypoint: [""]
stage: deploy_java stage: build
before_script: before_script:
- *kaniko-setup - *kaniko-setup
script: script:
...@@ -102,7 +112,7 @@ tag_container_image: ...@@ -102,7 +112,7 @@ tag_container_image:
image: image:
name: gcr.io/go-containerregistry/crane:debug name: gcr.io/go-containerregistry/crane:debug
entrypoint: [""] entrypoint: [""]
stage: deploy_deb stage: deploy
before_script: before_script:
- *crane-setup - *crane-setup
script: script:
......
...@@ -541,7 +541,7 @@ ...@@ -541,7 +541,7 @@
<profile> <profile>
<id>textgrid.deb</id> <id>textgrid.deb</id>
<activation> <activation>
<activeByDefault>true</activeByDefault> <activeByDefault>false</activeByDefault>
</activation> </activation>
<build> <build>
<plugins> <plugins>
......
...@@ -15,7 +15,7 @@ public class SearchResultListTest { ...@@ -15,7 +15,7 @@ public class SearchResultListTest {
@Test @Test
public void test() { public void test() {
SearchResultList results = SearchResultList SearchResultList results = SearchResultList
.create(repository.getPublicSearchClient(), "genre:\"verse\" AND edition.agent.value:\"anakreon\"", "both", null, false) .create(repository.getPublicSearchClient(), "work.genre:\"verse\" AND edition.agent.value:\"anakreon\"", "both", null, false)
.chunkSize(10); .chunkSize(10);
int i = 0; int i = 0;
for (ObjectType object : results) { for (ObjectType object : results) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment