Skip to content
Snippets Groups Projects
Commit 1aeea544 authored by Julian's avatar Julian
Browse files

CI jobs for linter and unit testing

parent bcdcdd11
No related branches found
No related tags found
No related merge requests found
Pipeline #8023 passed
image: registry.git.cccv.de/uffd/docker-images/buster
variables:
DEBIAN_FRONTEND: noninteractive
GIT_SUBMODULE_STRATEGY: normal
PYLINT_PIN: pylint~=2.10.0
before_script:
- python3 -V
- lsb_release -a
- uname -a
- python3 -m pylint --version
- python3 -m coverage --version
linter:bullseye:
image: registry.git.cccv.de/uffd/docker-images/bullseye
stage: test
script:
- pip3 install $PYLINT_PIN pylint-gitlab pylint-flask-sqlalchemy # this force-updates jinja2 and some other packages!
- python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabCodeClimateReporter 'server.py' > codeclimate.json
- python3 -m pylint --exit-zero --rcfile .pylintrc --output-format=pylint_gitlab.GitlabPagesHtmlReporter 'server.py' > pylint.html
- python3 -m pylint --rcfile .pylintrc --output-format=text 'server.py'
artifacts:
when: always
paths:
- pylint.html
reports:
codequality: codeclimate.json
unittests:buster:
image: registry.git.cccv.de/uffd/docker-images/buster
stage: test
script:
- python3-coverage run --include 'server.py' -m pytest --junitxml=report.xml || true
#- python3-coverage report -m
- python3-coverage html
#- python3-coverage xml
artifacts:
when: always
paths:
- htmlcov/index.html
- htmlcov
expose_as: 'Coverage Report'
reports:
#cobertura: coverage.xml
junit: report.xml
#coverage: '/^TOTAL.*\s+(\d+\%)$/'
unittests:bullseye:
image: registry.git.cccv.de/uffd/docker-images/bullseye
stage: test
script:
- python3-coverage run --include 'server.py' -m pytest --junitxml=report.xml || true
- python3-coverage report -m
- python3-coverage html
- python3-coverage xml
artifacts:
when: always
paths:
- htmlcov/index.html
- htmlcov
expose_as: 'Coverage Report'
reports:
cobertura: coverage.xml
junit: report.xml
coverage: '/^TOTAL.*\s+(\d+\%)$/'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment