Files
MSE-CyberSec-DevSecOps/.gitlab-ci.yml
2025-03-10 09:15:56 +01:00

37 lines
598 B
YAML

stages:
- build
build job:
stage: build
script:
- cd src
- apt-get update -qy
- apt-get install -y python3-dev python3-pip python3.12-venv
- python3 -V
- pip3 install -r requirements.txt
# launch tests
- export PYTHONPATH=.
- export FLASK_APP=app
- pytest tests --cov --cov-report term --cov-report html
artifacts:
paths:
- src/htmlcov/
pages:
stage: build
dependencies:
- build job
needs: ["build job"]
script:
- mv src/htmlcov/ public/
artifacts:
paths:
- public
expire_in: 7 days
only:
- main