Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.14 KiB
Newer Older
Paul Kuehnel's avatar
Paul Kuehnel committed
image: python:3.9

# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
  PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"

# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/topics/caching/
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
  paths:
    - .cache/pip
    - venv/

before_script:
  - python --version ; pip --version  # For debugging
  - pip install virtualenv
  - virtualenv venv
  - source venv/bin/activate

Paul Kuehnel's avatar
Paul Kuehnel committed
#test:
#  script:
#    - pip install ruff tox  # you can also use tox
#    - pip install --editable ".[test]"
#    - tox -e py,ruff
Paul Kuehnel's avatar
Paul Kuehnel committed
test:
Paul Kuehnel's avatar
Paul Kuehnel committed
    - pip install -r requirements.txt
    - python test.py
  #artifacts:
  #  paths:
  #    - build/*

pages:
  script:
    - pip install sphinx sphinx-rtd-theme
Paul Kuehnel's avatar
Paul Kuehnel committed
    - cd docs
    - make html
    - mv build/html/ ../public/
  artifacts:
    paths:
      - public
  rules:
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH

#deploy:
#  stage: deploy
#  script: echo "Define your deployment script!"
#  environment: production