Skip to content
Snippets Groups Projects
.gitlab-ci.yml 3.33 KiB
variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
stages:
  - init
  - build
  - test
  - doc
  - release


.virtualenv_template: &virtualenv_definition |
  ./scripts/create_venv.sh
  source venv/bin/activate
  pip install .

.test_template: &test_definition |
  source venv/bin/activate
  pip install -U pytest
  pytest

.junit_template: &junit_definition
    artifacts:
      reports:
        junit: "reports/junit*.xml"


download-pdfs:
    image: docker.km3net.de/base/ci-helper:1
    stage: init
    script:
        - ./scripts/get_pdfs.sh
    artifacts:
      paths:
        - pdfs
    cache:
      paths:
        - pdfs
      key: "init-$CI_COMMIT_REF_SLUG"

build-jpp-master-py35:
    image: docker.km3net.de/base/python:3.5
    stage: build
    script:
        - echo "CI_COMMIT_REF_SLUG = $CI_COMMIT_REF_SLUG"
        - *virtualenv_definition
    cache:
      paths:
        - venv
      key: "py35-$CI_COMMIT_REF_SLUG"
    artifacts:
      paths:
        - venv

build-jpp-master-py36:
    image: docker.km3net.de/base/python:3.6
    stage: build
    script:
        - *virtualenv_definition
    cache:
      paths:
        - venv
      key: "py36-$CI_COMMIT_REF_SLUG"
    artifacts:
      paths: