Browse Source

Switch to GitLab codeclimate CI

code_quality
Alexandre Iooss 7 years ago
parent
commit
1900449c7a
  1. 7
      .codeclimate.yml
  2. 32
      .gitlab-ci.yml

7
.codeclimate.yml

@ -0,0 +1,7 @@
engines:
pylint:
enabled: true
channel: "beta"
plugins:
- django

32
.gitlab-ci.yml

@ -1,20 +1,22 @@
--- ---
image: debian:stretch
stages: stages:
- lint - codequality
lint: code_quality:
stage: lint stage: codequality
image: docker:stable
variables: variables:
LANG: 'en_US.UTF-8' DOCKER_DRIVER: overlay2
LC_ALL: 'en_US.UTF-8' allow_failure: true
LANGUAGE: 'en_US.UTF-8' services:
- docker:stable-dind
script: script:
- apt-get -qq update - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/')
- DEBIAN_FRONTEND=noninteractive apt-get -qq install -y locales python3-django python3-pylint-django - docker run
- 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 --env SOURCE_CODE="$PWD"
- pylint3 --load-plugins pylint_django cotisations machines re2o logs topologie preferences search users || if [ $? -ne 1 ]; then exit 0; else exit 1; fi --volume "$PWD":/code
--volume /var/run/docker.sock:/var/run/docker.sock
"registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code
artifacts:
reports:
codequality: gl-code-quality-report.json

Loading…
Cancel
Save