diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 77933420624ea93d39f935a9aed0b3fbb352289c..761c217ccf9d396ac1e0f879982088a86ebb909f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,8 +10,8 @@ stages:
 build:
   image: openjdk:11
   stage: build
-  before_script:
-    - apt-get update && apt-get -y install graphviz
+  needs:
+    - "./gradlew relast"
   script:
     - "./gradlew assemble"
   artifacts:
@@ -24,10 +24,8 @@ test:
   stage: test
   needs:
     - build
-  before_script:
-    - apt-get update && apt-get -y install graphviz
   script:
-    - "./gradlew test generateGrammarDiagrams"
+    - "./gradlew test"
   artifacts:
     reports:
       junit: "*/build/test-results/test/TEST-*.xml"