diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..a0eb5d3c0ba28e99ea5737b65caf35b5b4e32995 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,66 @@ +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+\%)$/'