fmartingr
/
jeeves
Archived
1
0
Fork 0
This repository has been archived on 2021-02-14. You can view files and clone it, but cannot push or open issues or pull requests.
jeeves/.gitlab-ci.yml

46 lines
861 B
YAML

image: python:3
stages:
- test
- deploy
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/poetry"
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .cache/pip
- .cache/poetry
before_script:
- python -V
- pip install poetry
- "poetry config settings.virtualenvs.path ${POETRY_CACHE_DIR}"
- poetry install
test:
stage: test
script:
- poetry run pytest . --cov=jeeves.core --cov-report xml --cov-report term
artifacts:
paths:
- coverage.xml
pages:
stage: deploy
dependencies:
- test
script:
- poetry run docs/build.sh
- mv docs/_build/html/ public
- coverage html --directory public/htmlcov
artifacts:
paths:
- public
only:
- master