diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..ad8397f --- /dev/null +++ b/.gitlab-ci.yml @@ -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