From 7bd1d78b9d6a28a2b9dad4a8e00301f27ed39f97 Mon Sep 17 00:00:00 2001 From: Somoji Rao <51soch1mst@hft-stuttgart.de> Date: Tue, 4 Nov 2025 18:48:56 +0000 Subject: [PATCH 1/3] working on gitlab devops... --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..298323b --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,3 @@ +create_file: + script: + echo "Building ..." -- GitLab From aaf87d1972a6a3245520e3184e464a3b2c9cd14d Mon Sep 17 00:00:00 2001 From: Somoji Rao <51soch1mst@hft-stuttgart.de> Date: Tue, 4 Nov 2025 19:11:00 +0000 Subject: [PATCH 2/3] Update .gitlab-ci.yml, __init__.py --- .gitlab-ci.yml | 32 +++++++++++++++++++++++++++++--- __init__.py | 1 + 2 files changed, 30 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 298323b..8237f86 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,29 @@ -create_file: - script: - echo "Building ..." +stages: + - lint + - test + - run + + #define Python version to use in all jobs + image: python:3.11 + + before-script: + - pip install -r requirements.txt || pip install requests pytest pylint + + lint: + stage: lint + script: + - echo "Checking the Code style" + - pylint *.py --disable=C0114,C0115,C0116 + + test: + stage: test + script: + - echo "Running main data_fetch script" + - python data_fetch.py + - echo "Output file generated under ./output/" + - find output -type f | head -10 + artifacts: + paths: + - output/ + when: always + diff --git a/__init__.py b/__init__.py index e69de29..8b13789 100644 --- a/__init__.py +++ b/__init__.py @@ -0,0 +1 @@ + -- GitLab From fc75d28068d0bda71ff1ca2de4f98c9e30c80d93 Mon Sep 17 00:00:00 2001 From: Somoji Rao <51soch1mst@hft-stuttgart.de> Date: Tue, 4 Nov 2025 19:12:16 +0000 Subject: [PATCH 3/3] Update .gitlab-ci.yml file --- .gitlab-ci.yml | 53 ++++++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8237f86..2a9b9b9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,29 +1,36 @@ stages: - - lint - - test - - run + - lint + - test + - run - #define Python version to use in all jobs - image: python:3.11 +image: python:3.11 - before-script: - - pip install -r requirements.txt || pip install requests pytest pylint +before_script: + - pip install -r requirements.txt + - pip install pylint pytest - lint: - stage: lint - script: - - echo "Checking the Code style" - - pylint *.py --disable=C0114,C0115,C0116 +lint: + stage: lint + script: + - echo " Running linter..." + - pylint *.py --disable=C0114,C0115,C0116 + allow_failure: false - test: - stage: test - script: - - echo "Running main data_fetch script" - - python data_fetch.py - - echo "Output file generated under ./output/" - - find output -type f | head -10 - artifacts: - paths: - - output/ - when: always +test: + stage: test + script: + - echo " Running pytest tests..." + - pytest -v + allow_failure: false +run: + stage: run + script: + - echo " Running main data_fetch script..." + - python data_fetch.py + - echo " Output generated under ./output/" + - find output -type f | head -10 + artifacts: + paths: + - output/ + when: always -- GitLab