python-tests:
  stage: test
  coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
  services:
    - postgres:11
    - memcached:1.5.22
  image: python:3.7
  before_script:
    - pip install poetry --quiet
    - poetry config cache-dir .cache/poetry
    - poetry config virtualenvs.in-project true
    - poetry install --no-interaction --quiet
  script:
    - poetry run coverage run src/manage.py test newsreader
    - poetry run coverage report

javascript-tests:
  stage: test
  image: node:12
  before_script:
    - npm install
  script:
    - npm test
