From 7ea63fc5bccbeb4f3ec366293b029d199fa24450 Mon Sep 17 00:00:00 2001
From: swittl <simon.wittl@th-deg.de>
Date: Sat, 13 Jul 2024 11:36:14 +0200
Subject: [PATCH] test

---
 .gitlab-ci.yml | 58 +++++++++++++++++++++++++-------------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 286bee0..6dc28a0 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -4,39 +4,37 @@ stages:
   - docu
 
 cache:
-  - key: cache-$CI_COMMIT_REF_SLUG
-  - paths: 
+  key: cache-$CI_COMMIT_REF_SLUG
+  paths: 
     - /home/
 
-.before_script_template:
+.before_script_template: &before_script_template
   before_script:
-  - cd /home/
-  - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_interfaces
-  - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_hardware
-  - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_controller
-  - 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
-  - rosdep install --from-paths . -y --ignore-src
-  - colcon build --merge-install
-  - apt update
-  - apt install wget
-  - wget https://bootstrap.pypa.io/get-pip.py
-  - python3 ./get-pip.py
-
+    - cd /home/
+    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_interfaces
+    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_hardware
+    - git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@mygit.th-deg.de/roboct/robo_quality/rq_controller
+    - 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
+    - apt-get update && apt-get install -y wget python3-pip
+    - rosdep install --from-paths . -y --ignore-src
+    - colcon build --merge-install
 
 rq-pytests:
   stage: test
   image: ros:humble
-  extends: .before_script_template
+  <<: *before_script_template
   script:
-   - pip3 install pytest pytest-cov netCDF4 ros2-numpy Pillow pyometiff scipy
-  #  - python3 -m  pytest ./rq_controller/test/ --junitxml=report.xml
-   
+    - pip3 install pytest pytest-cov netCDF4 ros2-numpy Pillow pyometiff scipy
+    # Uncomment the following line to run tests
+    # - python3 -m pytest ./rq_controller/test/ --junitxml=report.xml
+
 build-ros:
   stage: build
   image: ros:humble
-  dependencies: [rq-pytests]
+  dependencies:
+    - rq-pytests
   script:
     - cd /home/
     - source ./install/setup.bash
@@ -49,18 +47,20 @@ build-ros:
 create-docu:
   stage: docu
   image: ros:humble
-  dependencies: [rq-pytests]
+  dependencies:
+    - rq-pytests
   before_script:
-   - cd /home/
-   - python3 ./get-pip.py
-   - pip3 install pdoc3 netCDF4 ros2-numpy Pillow pyometiff scipy open3d pathfinding3d
-   - git clone https://github.com/wittlsn/aRTist-PythonLib.git -b artist_thd_wip
-   - pip3 install ./aRTist-PythonLib/
+    - cd /home/
+    - apt-get update && apt-get install -y wget python3-pip
+    - pip3 install pdoc3 netCDF4 ros2-numpy Pillow pyometiff scipy open3d pathfinding3d
+    - git clone https://github.com/wittlsn/aRTist-PythonLib.git -b artist_thd_wip
+    - pip3 install ./aRTist-PythonLib/
   script:
     - cd /home/
     - source ./install/setup.bash
-    - mkdir doc
+    - mkdir -p doc
     - python3 -m pdoc --html rq_controller -o=./doc/rq_controller -c show_source_code=True
+    # Uncomment the following line to generate documentation for rq_hardware
     # - python3 -m pdoc --html rq_hardware -o=./doc/rq_hardware -c show_source_code=True
   artifacts:
     when: always
-- 
GitLab