feat: CI/CD for flake8 linting, warning : this commit is a test for the execution of the pipeline
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
stages:
|
default:
|
||||||
- build
|
image: python:3.9
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- lint
|
||||||
|
- build
|
||||||
|
|
||||||
build job:
|
build job:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- cd src
|
- cd src
|
||||||
- apt-get update -qy
|
# - apt-get update -qy
|
||||||
- apt-get install -y python3-dev python3-pip python3.12-venv curl
|
# - apt-get install -y python3-dev python3-pip python3.12-venv curl
|
||||||
- python3 -V
|
- python3 -V
|
||||||
# - pip3 install --break-system-packages -r requirements.txt
|
# - pip3 install --break-system-packages -r requirements.txt
|
||||||
- curl -sSL https://pdm-project.org/install-pdm.py | python3 -
|
- curl -sSL https://pdm-project.org/install-pdm.py | python3 -
|
||||||
@@ -22,11 +25,18 @@ build job:
|
|||||||
- export FLASK_APP=app
|
- export FLASK_APP=app
|
||||||
- pdm run pytest tests --cov --cov-report term --cov-report html
|
- pdm run pytest tests --cov --cov-report term --cov-report html
|
||||||
|
|
||||||
|
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- src/htmlcov/
|
- src/htmlcov/
|
||||||
|
|
||||||
|
lint job:
|
||||||
|
stage: lint
|
||||||
|
dependencies: []
|
||||||
|
script:
|
||||||
|
- python3 -m pip install flake8
|
||||||
|
- flake8 src/
|
||||||
|
allow_failure: true # Linter can fail, fixing it is for now outside of the projects scope
|
||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: build
|
stage: build
|
||||||
dependencies:
|
dependencies:
|
||||||
|
Reference in New Issue
Block a user