From b30a7eb3e64d063766847ff9734d3aa4dbc9f321 Mon Sep 17 00:00:00 2001
From: iamashwin99 <ashwin-kumar.karnad@mpsd.mpg.de>
Date: Thu, 22 Jun 2023 11:03:26 +0200
Subject: [PATCH] switch the ci to use precommit

---
 .gitlab-ci.yml | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c7020b0..9a51d51 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -15,7 +15,7 @@ stages:
   - ls -l
   - pip install -U pip
   - pip --version
-  - pip install pytest black ruff pydocstyle
+  - pip install pytest black ruff pydocstyle pre-commit rstcheck
   - pytest --version
   - cat /etc/issue
 
@@ -75,15 +75,7 @@ style:
   image: python:latest
   script:
     - *prepare_style
-    - black --version
-    - ruff --version
-    - pydocstyle --version
-    - ruff .
-    - black --check --diff .
-    - pydocstyle src/mpsd_software_manager/mpsd_software.py
-    - pydocstyle tests/test_mpsd_software.py
-    # we could also use `ruff --select D` for pycodestyle. But the behaviour is not exactly the same.
-    - src/mpsd_software_manager/mpsd_software.py --version
+    - pre-commit run --all-files
 
 
 test-bullseye:
-- 
GitLab