From 42488d69483061bb300c8fd2aae416eacf414479 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Sun, 16 Feb 2020 19:32:51 +0100 Subject: [PATCH] Add linting (pylint / mypy) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- .gitlab-ci.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..f738179 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,45 @@ +stages: +- lint + +.python-3.7: + image: python:3.7 + +.python-3.8: + image: python:3.8 + +.pylint: + stage: lint + script: + - apt update && apt install -y libidn11-dev build-essential cmake + - pip3 install pylint pyasn1-modules cffi --upgrade + - pip3 install -e git+https://lab.louiz.org/poezio/slixmpp.git#egg=slixmpp + - pip3 install -e git+https://lab.louiz.org/poezio/slixmpp-omemo.git#egg=slixmpp-omemo + - pip3 install -e git+https://lab.louiz.org/poezio/poezio.git#egg=poezio + - python3 setup.py install + - pylint -E poezio_omemo + +.mypy: + stage: lint + script: + - pip3 install mypy + - mypyc --ignore-missing-imports ./poezio_omemo + +lint-3.7-pylint: + extends: + - .python-3.7 + - .pylint + +lint-3.8-pylint: + extends: + - .python-3.8 + - .pylint + +lint-3.7-mypy: + extends: + - .python-3.7 + - .mypy + +lint-3.8-mypy: + extends: + - .python-3.8 + - .mypy