jail2ban/.gitlab-ci.yml

48 lines
931 B
YAML

---
run pylint:
stage: test
image: python:3.11
script:
- pip install --upgrade pylint
- pylint $(git ls-files '*.py')
tags:
- docker
run flake8:
stage: test
image: python:3.11
script:
- pip install --upgrade flake8
- flake8 $(git ls-files '*.py')
tags:
- docker
run mypy:
stage: test
image: python:3.11
script:
- pip install --upgrade mypy
- mypy --install-types --non-interactive $(git ls-files '*.py')
tags:
- docker
run tests:
stage: test
image: python:3.11
script:
- pip install pytest pytest-cov pytest-mock pytest-flask
- pip install Flask-HTTPAuth
- coverage run -m pytest --junitxml=report.xml
- coverage report
- coverage xml
coverage: '/^TOTAL.+?(\d+\%)$/'
artifacts:
when: always
reports:
coverage_report:
coverage_format: cobertura
path: coverage.xml
junit: report.xml
tags:
- docker