From 61d50cd13c77228a96922886cd39979cea37e94a Mon Sep 17 00:00:00 2001 From: Firq Date: Sun, 1 Oct 2023 19:54:06 +0200 Subject: [PATCH] Updated CI with anchors --- .gitlab-ci.yml | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3046fc6..80dcd6c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,17 +1,24 @@ stages: - quality assurance +.init_venv: &init_venv + - python -m venv .venv + - source .venv/bin/activate + - python --version + - echo "venv '$VIRTUAL_ENV'" + +.install_requirements: &install_requirements + - pip install -r requirements.txt --disable-pip-version-check -q + - python -m pip list --format=columns --disable-pip-version-check + backend-pylint: stage: quality assurance image: python:3.11.4-buster before_script: - cd backend - - python -m venv .venv - - source .venv/bin/activate - - echo "venv '$VIRTUAL_ENV'" - - pip install -r requirements.txt --disable-pip-version-check -q + - *init_venv + - *install_requirements - pip install pylint --disable-pip-version-check -q - - python --version - - python -m pip list --format=columns --disable-pip-version-check + - pylint --version script: - - pylint src/* --fail-under 9 \ No newline at end of file + - pylint src/* --fail-under 9