stages: - test - analyze code_quality: stage: test image: "cirrusci/flutter:1.22.5" before_script: - cd "$CI_PROJECT_DIR/garden_planner" - pub global activate dart_code_metrics - export PATH="$PATH:$HOME/.pub-cache/bin" script: - cd "$CI_PROJECT_DIR/garden_planner" - metrics lib -r codeclimate > gl-code-quality-report.json artifacts: reports: codequality: garden_planner/gl-code-quality-report.json analyze:sonar: stage: analyze image: name: sonarsource/sonar-scanner-cli:4.5 entrypoint: [""] variables: # Defines the location of the analysis task cache SONAR_USER_HOME: "${CI_PROJECT_DIR}/garden_planner/.sonar" # Shallow cloning needs to be disabled. # See https://docs.sonarqube.org/latest/analysis/gitlab-cicd/. GIT_DEPTH: 0 cache: key: "${CI_JOB_NAME}" paths: - garden_planner/.sonar/cache script: - sonar-scanner