Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.45 KiB
Newer Older
before_script:
    # Install requirements for pyramid:
    - conda env create -q # -q: quiet/ no progressbar, because it spams the log!
    - source activate pyramid
    - conda info --envs
Jan Caron's avatar
Jan Caron committed
    # Install jutil via deploy token access:
    - pip install git+https://pyramid:"$JUTIL_DEPLOY_TOKEN"@jugit.fz-juelich.de/j.ungermann/jutil.git
Jan Caron's avatar
Jan Caron committed
stages:
    - test
    - deploy  # TODO: add stage later, upload docs, coverage and such, shift artifacts here?
Jan Caron's avatar
Jan Caron committed
test_style:
    image: continuumio/miniconda3:latest
    stage: test
    script:
        # -m: only run tests marked with "flake8"
        - python setup.py test --addopts "--flake8 -m flake8"
Jan Caron's avatar
Jan Caron committed
test_function:
    image: continuumio/miniconda3:latest
    stage: test
    artifacts:
        paths:
            - .coverage
        expire_in: 1 week
    script:
        # Execute all tests and also check coverage with --cov:
        - python setup.py test --addopts "--cov"
Jan Caron's avatar
Jan Caron committed
test_docs:
    image: continuumio/miniconda3:latest
    stage: test
    script:
    # -f: Force overwriting of any existing generated files.
    # -e: Put documentation for each module on its own page.
    # -o: Directory to place the output files. If it does not exist, it is created.
    # last parameter: module path
    - sphinx-apidoc -f -e -o docs/api pyramid
    # Build the documentation from 'docs' and put into 'build/sphinx':
    - sphinx-build docs build/sphinx
    artifacts:
        paths:
            - build/sphinx
        expire_in: 1 week