Add new file
This commit is contained in:
parent
e74e1c1c9b
commit
2c915d0570
1 changed files with 43 additions and 0 deletions
43
.gitlab-ci.yml
Normal file
43
.gitlab-ci.yml
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue