stages:
  - build
  - test
  - lint
  - release
  - deploy

variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
  DJANGO_SETTINGS_MODULE: "newsreader.conf.gitlab"
  POSTGRES_HOST: "$POSTGRES_HOST"
  POSTGRES_DB: "$POSTGRES_NAME"
  POSTGRES_NAME: "$POSTGRES_NAME"
  POSTGRES_USER: "$POSTGRES_USER"
  POSTGRES_PASSWORD: "$POSTGRES_PASSWORD"

cache:
  key: "$CI_COMMIT_REF_SLUG"
  paths:
    - .venv/
    - .cache/pip
    - .cache/poetry
    - node_modules/

include:
  - local: '/gitlab-ci/build.yml'
  - local: '/gitlab-ci/test.yml'
  - local: '/gitlab-ci/lint.yml'
  - local: '/gitlab-ci/release.yml'
  - local: '/gitlab-ci/deploy.yml'
