Testing with Pylint HTML reports

This commit is contained in:
Firq 2023-10-01 22:27:16 +02:00
parent 60640ae9a4
commit 1cb4420353
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20

View file

@ -1,5 +1,6 @@
stages: stages:
- quality assurance - quality assurance
- deploy
.init_venv: &init_venv .init_venv: &init_venv
- python -m venv .venv - python -m venv .venv
@ -15,7 +16,7 @@ backend-pylint:
stage: quality assurance stage: quality assurance
image: python:3.11.4-buster image: python:3.11.4-buster
before_script: before_script:
- mkdir -p public/lint - mkdir -p public
- cd backend - cd backend
- *init_venv - *init_venv
- *install_requirements - *install_requirements
@ -23,9 +24,22 @@ backend-pylint:
- pylint --version - pylint --version
script: script:
- pylint src/* --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter > ../codeclimate.json - pylint src/* --exit-zero --output-format=pylint_gitlab.GitlabCodeClimateReporter > ../codeclimate.json
- pylint src/* --exit-zero --output-format=pylint_gitlab.GitlabPagesHtmlReporter > ../public/index.html
artifacts: artifacts:
paths: paths:
- public - public
reports: reports:
codequality: codeclimate.json codequality: codeclimate.json
when: always when: always
pages:
stage: deploy
image: alpine:latest
script:
- echo "Deployed!"
artifacts:
paths:
- public
only:
refs:
- main