diff options
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 39 |
1 files 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 |