From 528da91ed49a44b1d02d720bb0917df3c5a18305 Mon Sep 17 00:00:00 2001 From: "Alec.Schmidt" Date: Tue, 18 Mar 2025 10:03:42 +0100 Subject: [PATCH] feat: CI/CD for flake8 linting, warning : this commit is a test for the execution of the pipeline --- .gitlab-ci.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1029ba4..c0412a4 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,13 +1,16 @@ -stages: - - build +default: + image: python:3.9 +stages: + - lint + - build build job: stage: build script: - cd src - - apt-get update -qy - - apt-get install -y python3-dev python3-pip python3.12-venv curl + # - apt-get update -qy + # - apt-get install -y python3-dev python3-pip python3.12-venv curl - python3 -V # - pip3 install --break-system-packages -r requirements.txt - curl -sSL https://pdm-project.org/install-pdm.py | python3 - @@ -22,11 +25,18 @@ build job: - export FLASK_APP=app - pdm run pytest tests --cov --cov-report term --cov-report html - artifacts: paths: - src/htmlcov/ +lint job: + stage: lint + dependencies: [] + script: + - python3 -m pip install flake8 + - flake8 src/ + allow_failure: true # Linter can fail, fixing it is for now outside of the projects scope + pages: stage: build dependencies: