Update CI installation steps

This commit is contained in:
Sonny Bakker 2024-08-24 15:36:14 +02:00
parent 07c685401f
commit b6805c1675
3 changed files with 6 additions and 3 deletions

View file

@ -6,6 +6,7 @@ stages:
variables: variables:
UV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/uv" UV_CACHE_DIR: "$CI_PROJECT_DIR/.cache/uv"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
DJANGO_SETTINGS_MODULE: "newsreader.conf.gitlab" DJANGO_SETTINGS_MODULE: "newsreader.conf.gitlab"
POSTGRES_HOST: "$POSTGRES_HOST" POSTGRES_HOST: "$POSTGRES_HOST"
POSTGRES_DB: "$POSTGRES_NAME" POSTGRES_DB: "$POSTGRES_NAME"
@ -16,7 +17,7 @@ variables:
cache: cache:
key: "$CI_COMMIT_REF_SLUG" key: "$CI_COMMIT_REF_SLUG"
paths: paths:
- env/ - .cache/pip
- .cache/uv - .cache/uv
- node_modules/ - node_modules/

View file

@ -2,7 +2,8 @@ python-linting:
stage: lint stage: lint
image: python:3.11 image: python:3.11
before_script: before_script:
- uv pip install --requirement requirements/ci.txt - pip install --system uv
- uv pip install --system --requirement requirements/ci.txt
script: script:
- isort --check-only src/ - isort --check-only src/
- black --line-length 88 --check src/ - black --line-length 88 --check src/

View file

@ -6,7 +6,8 @@ python-tests:
- memcached:1.5.22 - memcached:1.5.22
image: python:3.11 image: python:3.11
before_script: before_script:
- uv pip install --requirement requirements/ci.txt - pip install --system uv
- uv pip install --system --requirement requirements/ci.txt
script: script:
- coverage run ./src/manage.py test newsreader - coverage run ./src/manage.py test newsreader