From e92e6bd1c4974f2a77d8ca690667519376e913d8 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 21 Oct 2023 12:02:41 -0300 Subject: Trying the python image directly --- .gitlab-ci.yml | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 26a09d3..32b3a3b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,24 +1,27 @@ -stages: - - lint - - test +image: python:3.11.5 + +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" + +cache: + paths: + - .cache/pip + +before_script: + - python --version ; pip --version # For debugging + - pip install virtualenv + - virtualenv venv + - source venv/bin/activate + - pip install -r requirements.txt lint: - stage: lint script: - - apt-get update -qy - - apt-get install -y python3 python3-pip - - python3 -m pip install -r requirements.txt - - python3 -m black --check . - - python3 -m isort --check . - - python3 -m flake8 - - python3 -m pylint app - - python3 -m mypy . + - python -m black --check . + - python -m isort --check . + - python -m flake8 + - python -m pylint app + - python -m mypy . test: - stage: test script: - - apt-get update -qy - - apt-get install -y python3 python3-pip - - python3 -m pip install --upgrade pip - - python3 -m pip install -r requirements.txt - - python3 -m pytest + - python -m pytest -- cgit v1.2.3