From eb8131d2951b6c4b72e5af1b08aa9113be4b85fd Mon Sep 17 00:00:00 2001 From: Hugo Hervieux Date: Sat, 11 Nov 2017 22:34:11 +0100 Subject: [PATCH] Add gitlab-ci support and pylint --- .gitlab-ci.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..95aaebe3 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,21 @@ +--- +image: debian:stretch +stages: + - lint + +lint: + stage: lint + variables: + LANG: 'en_US.UTF-8' + LC_ALL: 'en_US.UTF-8' + LANGUAGE: 'en_US.UTF-8' + script: + - apt-get -qq update + - DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales python3-pip python3-django + - sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && dpkg-reconfigure --frontend=noninteractive locales && update-locale LANG=en_US.UTF-8 + - pip3 install -q pylint-django + - pylint --load-plugins pylint_django cotisations machines re2o logs topologie preferences search users || if [ $? -ne 1 ]; then exit 0; else exit 1; fi + + + +