before_script:
  - "pip install -r .ci/requirements.txt"
  - "REQUIREMENTS=$(mktemp) && python setup.py requirements > ${REQUIREMENTS} && pip install -r ${REQUIREMENTS} && rm ${REQUIREMENTS}"
  - "pip install -r .ci/requirements_modules.txt"

build:3:
  image: "python:3"
  stage: "build"
  script:
    - "./tools/local_install.sh --local-modules ~/bin"

pyflakes:3:
  image: "python:3"
  stage: "test"
  script:
      - "./tools/pyflakes.sh"

pyflakes-strict:3:
  image: "python:3"
  stage: "test"
  script:
    # TODO: move to .ci/requirements.txt
    - "pip install flake8-bugbear"
    - "./tools/pyflakes-strict.sh"

load-modules:3:
  image: "python:3"
  stage: "test"
  script:
    - "./tools/local_run.sh config update"

unittests:3:
  image: "python:3"
  stage: "test"
  script:
    - "./tools/run_tests.sh --no-modules"

unittests-modules:3:
  image: "python:3"
  stage: "test"
  allow_failure: true
  script:
    - "./tools/run_tests.sh --no-core"

doc:3:
  image: "python:3"
  stage: "deploy"
  script:
    - "cd ./docs && make html"
