From 14127bf4180f022be8facef6f980306416ff2d93 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Fri, 25 May 2018 12:12:40 +0200 Subject: [PATCH] gitlab-ci: combine all lint/syntax/safety checks into a single job This should make it easier to accept merge requests where there are only cosmetic problems with them. pep8/pylint/pyflakes runs can then be disabled in the 'test' job by not installing the in the ci-images-server base image. --- .gitlab-ci.yml | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3cbb4b08..e5b9597f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -121,24 +121,17 @@ pip_install: - fdroid readmeta - fdroid update --help -pyup_io_safety_check: +lint_format_safety_checks: image: alpine:3.7 variables: LANG: C.UTF-8 script: - - apk add --no-cache ca-certificates python3 + - apk add --no-cache bash dash ca-certificates python3 - python3 -m ensurepip - - pip3 install safety - - safety check --full-report - -pylint: - image: alpine:3.7 - variables: - LANG: C.UTF-8 - script: - - apk add --no-cache ca-certificates python3 - - python3 -m ensurepip - - pip3 install pylint + - pip3 install pep8 pyflakes pylint safety + - export EXITVALUE=0 + - ./hooks/pre-commit || export EXITVALUE=1 + - safety check --full-report || export EXITVALUE=1 - pylint --rcfile=.pylint-rcfile --output-format=colorized --reports=n fdroid makebuildserver @@ -146,6 +139,8 @@ pylint: fdroidserver/*.py tests/*.py tests/*.TestCase + || export EXITVALUE=1 + - exit $EXITVALUE fedora_latest: image: fedora:latest