From 8321642a34445b35bf19dcf729b0e22e48fc1511 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 4 Jan 2022 17:41:06 +0100 Subject: [PATCH 1/3] Add codequality --- .gitlab-ci.yml | 14 +++++++++++++- .gitlab/ci/test.gitlab-ci.yml | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8403cb8e8..43afb7d4e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ stages: - build - install - - tests + - test - lint - doc - translation @@ -13,6 +13,17 @@ default: # All jobs are interruptible by default interruptible: true +code_quality: + tags: + - docker + +code_quality_html: + extends: code_quality + variables: + REPORT_FORMAT: html + artifacts: + paths: [gl-code-quality-report.html] + # see: https://docs.gitlab.com/ee/ci/yaml/#switch-between-branch-pipelines-and-merge-request-pipelines workflow: rules: @@ -29,4 +40,5 @@ variables: YNH_BUILD_DIR: "ynh-build" include: + - template: Code-Quality.gitlab-ci.yml - local: .gitlab/ci/*.gitlab-ci.yml diff --git a/.gitlab/ci/test.gitlab-ci.yml b/.gitlab/ci/test.gitlab-ci.yml index 1aad46fbe..64ca65d13 100644 --- a/.gitlab/ci/test.gitlab-ci.yml +++ b/.gitlab/ci/test.gitlab-ci.yml @@ -3,7 +3,7 @@ - DEBIAN_FRONTEND=noninteractive SUDO_FORCE_REMOVE=yes apt --assume-yes -o Dpkg::Options::="--force-confold" --allow-downgrades install ./$YNH_BUILD_DIR/*.deb .test-stage: - stage: tests + stage: test image: "after-install" variables: PYTEST_ADDOPTS: "--color=yes" @@ -28,7 +28,7 @@ ######################################## full-tests: - stage: tests + stage: test image: "before-install" variables: PYTEST_ADDOPTS: "--color=yes" From 816c503d3af888cdb59988d64181a2d1a57a9307 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 4 Jan 2022 17:59:37 +0100 Subject: [PATCH 2/3] add codeclimate file --- .codeclimate.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .codeclimate.yml diff --git a/.codeclimate.yml b/.codeclimate.yml new file mode 100644 index 000000000..73707650c --- /dev/null +++ b/.codeclimate.yml @@ -0,0 +1,22 @@ +--- +version: "2" +plugins: + duplication: + enabled: true + config: + languages: + python: + python_version: 3 + shellcheck: + enabled: true + pep8: + enabled: true + sonar-python: + enabled: true + config: + tests_patterns: + - bin/* + - data/** + - doc/* + - src/** + - tests/** \ No newline at end of file From 4a377bbf23ee65fd31d2cd2f6bbb375438056b4c Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 4 Jan 2022 18:05:24 +0100 Subject: [PATCH 3/3] add fixme plugin --- .codeclimate.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.codeclimate.yml b/.codeclimate.yml index 73707650c..453396f07 100644 --- a/.codeclimate.yml +++ b/.codeclimate.yml @@ -11,6 +11,8 @@ plugins: enabled: true pep8: enabled: true + fixme: + enabled: true sonar-python: enabled: true config: