From 025eee112e5d8180ba4482ce5a7ded2f3b52faee Mon Sep 17 00:00:00 2001 From: Fontrodona Nicolas <nicolas.fontrodona@ens-lyon.fr> Date: Mon, 16 Nov 2020 10:04:02 +0100 Subject: [PATCH] .gitlab-ci.yml naming stages ad moving artifacts in the first job --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ff8849..22d931c 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: -- GitLab