From 29ed01bb2bada50a71adc2582b4235cb66b3e2e2 Mon Sep 17 00:00:00 2001
From: swittl <simon.wittl@th-deg.de>
Date: Fri, 12 Jul 2024 07:23:52 +0200
Subject: [PATCH] added test and docu

---
 .gitlab-ci.yml | 36 +++++++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aa4fd6c..f5e1e27 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,9 +1,11 @@
 stages:
+  - test
   - build
+  - docu
 
 
-build-ros:
-  stage: build
+rq-pytests:
+  stage: test
   image: ros:humble
   before_script:
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_interfaces
@@ -12,12 +14,36 @@ build-ros:
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_ddetection
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_trajectory
    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_reconstruction
-   
-  script:
    - rosdep install --from-paths . -y --ignore-src
    - colcon build --merge-install
-  coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/'
+
+  script:
+   - pytest ./rq_controller/tests/
+   
+build-ros:
+  stage: build
+  image: ros:humble
+  dependencies: [rq-pytests]
+  needs:
+  - rq-pytests
   artifacts:
     when: always
     paths:
       - install
+
+create-docu:
+  stage: docu
+  image: ros:humble
+  dependencies: [rq-pytests]
+  needs:
+  - rq-pytests
+  before_script:
+    - pip install pdoc3
+    - source ./install/setup.bash
+  script:
+    - mkdir doc
+    - pdoc3 --html rq_controller -o=./doc/rq_controller -c show_source_code=True
+  artifacts:
+    when: always
+    paths:
+      - doc
-- 
GitLab