GardenPlanner/.gitlab-ci.yml

61 lines
1.2 KiB
YAML
Raw Normal View History

2023-06-25 10:15:30 +02:00
2023-06-25 10:13:39 +02:00
stages:
- analyze
2023-06-25 10:15:30 +02:00
- build
analyze:
stage: analyze
image: cirrusci/flutter:latest
before_script:
- cd "$CI_PROJECT_DIR/garden_planner"
script:
- flutter analyze --write=analyzer-output.txt
artifacts:
paths:
- analyzer-output.txt
2023-06-25 10:13:39 +02:00
2023-06-25 10:15:30 +02:00
build:
stage: build
image: cirrusci/flutter:latest
2023-06-25 10:13:39 +02:00
before_script:
- cd "$CI_PROJECT_DIR/garden_planner"
script:
2023-06-25 10:15:30 +02:00
- flutter packages get
- flutter build apk
artifacts:
paths:
- garden_planner/build/app/outputs/apk/release/app-release.apk
test:
stage: build
image: cirrusci/flutter:latest
before_script:
2023-06-25 10:13:39 +02:00
- cd "$CI_PROJECT_DIR/garden_planner"
2023-06-25 10:15:30 +02:00
- flutter packages get
script:
- flutter test --coverage
2023-06-25 10:13:39 +02:00
artifacts:
2023-06-25 10:15:30 +02:00
paths:
- garden_planner/coverage/lcov.info
sonar:
2023-06-25 10:13:39 +02:00
stage: analyze
image:
2023-06-25 10:15:30 +02:00
name: jdwvierling/sonarflutter:1
2023-06-25 10:13:39 +02:00
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