Commit 051355b0 authored by Martin Juhás's avatar Martin Juhás
Browse files

Merge branch '338-add-dependency-caching-to-pipeline' into 'main'

Resolve "Add dependency caching to pipeline"

See merge request inject/backend!307
parents cccf839a aa7db573
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -18,6 +18,8 @@ variables:
  # https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-the-overlayfs-driver
  DOCKER_DRIVER: overlay2
  DOCKER_TLS_CERTDIR: ""
  POETRY_VIRTUALENVS_PATH: "$CI_PROJECT_DIR/.cache/pypoetry/virtualenvs"
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

default:
  tags:
@@ -35,9 +37,17 @@ unit_tests:
    POSTGRES_NAME: inject
    POSTGRES_USER: $INJECT_DB_USER
    POSTGRES_PASSWORD: $INJECT_DB_PASS
  script:
  cache:
    key:
      files:
        - poetry.lock
    paths:
      - .cache/pypoetry/virtualenvs
      - .cache/pip
  before_script:
    - pip install poetry
    - poetry install --no-interaction --no-ansi
    - poetry install --no-interaction --no-ansi --sync --no-root
  script:
    - poetry run black --check .
    - poetry run mypy .
    - poetry run python manage.py test