43 lines
744 B
YAML
43 lines
744 B
YAML
stages:
|
|
- test
|
|
- deploy
|
|
|
|
variables:
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
|
|
PYTHON_VERSION: "3.9"
|
|
|
|
cache:
|
|
paths:
|
|
- .cache/pip
|
|
- venv/
|
|
|
|
before_script:
|
|
- python --version
|
|
- pip install -e .
|
|
|
|
test:
|
|
stage: test
|
|
image: python:$PYTHON_VERSION
|
|
script:
|
|
- pytest --cov=filevault --cov-report=xml
|
|
coverage: '/^TOTAL.*\s+(\d+%)$/' # Extract coverage percentage
|
|
artifacts:
|
|
when: always
|
|
reports:
|
|
coverage_report:
|
|
coverage_format: cobertura
|
|
path: coverage.xml
|
|
paths:
|
|
- coverage.xml
|
|
expire_in: 1 week
|
|
|
|
pages:
|
|
stage: deploy
|
|
script:
|
|
- mkdir -p public
|
|
- echo "Documentation coming soon" > public/index.html
|
|
artifacts:
|
|
paths:
|
|
- public
|
|
only:
|
|
- main
|