2021-06-28 02:07:45 -04:00
|
|
|
# To contribute improvements to CI/CD templates, please follow the Development guide at:
|
|
|
|
# https://docs.gitlab.com/ee/development/cicd/templates.html
|
|
|
|
# This specific template is located at:
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/blob/master/lib/gitlab/ci/templates/Flutter.gitlab-ci.yml
|
|
|
|
|
2020-12-17 01:10:13 -05:00
|
|
|
code_quality:
|
|
|
|
stage: test
|
|
|
|
image: "cirrusci/flutter:1.22.5"
|
|
|
|
before_script:
|
|
|
|
- pub global activate dart_code_metrics
|
|
|
|
- export PATH="$PATH":"$HOME/.pub-cache/bin"
|
|
|
|
script:
|
|
|
|
- metrics lib -r codeclimate > gl-code-quality-report.json
|
|
|
|
artifacts:
|
|
|
|
reports:
|
|
|
|
codequality: gl-code-quality-report.json
|
|
|
|
|
|
|
|
test:
|
|
|
|
stage: test
|
|
|
|
image: "cirrusci/flutter:1.22.5"
|
|
|
|
before_script:
|
|
|
|
- pub global activate junitreport
|
|
|
|
- export PATH="$PATH":"$HOME/.pub-cache/bin"
|
|
|
|
script:
|
|
|
|
- flutter test --machine --coverage | tojunit -o report.xml
|
|
|
|
- lcov --summary coverage/lcov.info
|
|
|
|
- genhtml coverage/lcov.info --output=coverage
|
|
|
|
coverage: '/lines\.*: \d+\.\d+\%/'
|
|
|
|
artifacts:
|
|
|
|
name: coverage
|
|
|
|
paths:
|
|
|
|
- $CI_PROJECT_DIR/coverage
|
|
|
|
reports:
|
|
|
|
junit: report.xml
|