diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ff884961c0fa28644077f008fe871147adca13f..22d931ced735f7f21caf68e26acd32e3c92a9135 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,9 @@ +stages: + - unittest + - quality + tests: + stage: unittest image: "python:3.8-slim" before_script: - apt-get update @@ -19,9 +24,13 @@ tests: script: - coverage run -m unittest discover - coverage xml + artifacts: + reports: + junit: coverage.xml sonarqube-check: + stage: quality image: name: sonarsource/sonar-scanner-cli:latest entrypoint: [ "" ] @@ -30,9 +39,8 @@ sonarqube-check: SONAR_HOST_URL: http://192.168.1.58:9000/ # You have to not use localhost otherwise it will not work 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 - artifacts: - reports: - junit: coverage.xml + dependencies: + - unittest cache: key: "${CI_JOB_NAME}" paths: