.gitlab-ci.yml 2.14 KiB
stages:
- test
- build
- release
variables:
# Submodule clone
GIT_SUBMODULE_STRATEGY: recursive
test:
image: python:3
stage: test
cache:
paths:
- .cache/pip
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- pip install tox
except:
- schedules
script:
- tox
lint:
stage: test
image: python:3
cache:
paths:
- .cache/pip
- .cache/pre-commit
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PRE_COMMIT_HOME: "$CI_PROJECT_DIR/.cache/pre-commit"
before_script:
- pip install pre-commit
except:
- schedules
script:
- pre-commit run -a
bump-python-deps:
stage: release
image: registry.gitlab.com/teklia/devops:latest
only:
- schedules
script:
- devops python-deps requirements.txt docs-requirements.txt
.docs:
image: python:3
artifacts:
paths:
- public
before_script:
- pip install -r docs-requirements.txt