diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 4e62d0250a01739ef63d3eb2c26880fb4334731c..75fb10c7de68040c6d9a5e4219b9537c93d883dc 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -18,7 +18,7 @@ variables:
 ###################
 .webapp: &webapp
   image: alpine:3.14
-  stage: deploy_deb
+  stage: deploy
   script:
     - source $VARIABLES_FILE
     - 'apk add --no-cache bash'
@@ -40,9 +40,10 @@ variables:
   - crane auth login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
 
 stages:
-  - build_version
-  - deploy_java
-  - deploy_deb
+  - prepare
+  - test
+  - build
+  - deploy
 
 # Cache downloaded dependencies and plugins between builds.
 # To keep cache across branches add 'key: "$CI_JOB_NAME"'
@@ -54,7 +55,7 @@ cache:
 # Get the project version from main POM file and store it to artifact.
 get_version:
   image: maven:3.8.3-jdk-8
-  stage: build_version
+  stage: prepare
   script:
     - 'PVERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:3.1.1:evaluate -Dexpression=project.version -q -DforceStdout)'
     - echo "export PVERSION=$PVERSION" > $VARIABLES_FILE
@@ -67,13 +68,22 @@ get_version:
     paths:
       - $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:
   image: maven:3.8.3-jdk-8
-  only:
-    - develop
-#    - main
-  stage: deploy_java
+  stage: build
   script:
     - source $VARIABLES_FILE
     - git submodule update --recursive --init
@@ -89,7 +99,7 @@ build_container_image:
   image:
     name: gcr.io/kaniko-project/executor:debug
     entrypoint: [""]
-  stage: deploy_java
+  stage: build
   before_script:
     - *kaniko-setup
   script:
@@ -102,7 +112,7 @@ tag_container_image:
   image:
     name: gcr.io/go-containerregistry/crane:debug
     entrypoint: [""]
-  stage: deploy_deb
+  stage: deploy
   before_script:
     - *crane-setup
   script:
diff --git a/pom.xml b/pom.xml
index 5284cd65925da303cd46ea39181b36f6729ca184..2ddd80ce81515b1054ec461144b1cd920f18502d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -541,7 +541,7 @@
 		<profile>
 			<id>textgrid.deb</id>
 			<activation>
-				<activeByDefault>true</activeByDefault>
+				<activeByDefault>false</activeByDefault>
 			</activation>
 			<build>
 				<plugins>
diff --git a/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java b/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java
index 5ed4c3d60679b751e9e7205bc537b3958f76c7dd..f5524b02c8bb22d809dbfd21fdbf6de6beffd6c3 100644
--- a/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java
+++ b/src/test/java/info/textgrid/services/aggregator/SearchResultListTest.java
@@ -15,7 +15,7 @@ public class SearchResultListTest {
 	@Test
 	public void test() {
 		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);
 		int i = 0;
 		for (ObjectType object : results) {