diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ca34243b01f7044d5ec94047e976a7407beeb126..b2b87702f48c1ddc00dbbf887469b46a6ed6feb1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -18,3 +18,24 @@ tests: - pip install biopython==1.75 script: - coverage run -m unittest discover + +sonarqube-check: + image: + name: sonarsource/sonar-scanner-cli:latest + entrypoint: [ "" ] + variables: + SONAR_TOKEN: ae2c1731888a2155e90ea0a1dcec551c8d4336bd + SONAR_HOST_URL: http://localhost:9000/ + SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache + GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task + cache: + key: "${CI_JOB_NAME}" + paths: + - .sonar/cache + script: + - sonar-scanner -Dsonar.qualitygate.wait=true + allow_failure: true + only: + - merge_requests + - master + - develop