stages: # List of stages for jobs, and their order of execution
# - build
- test
# - deploy
before_script:
- flutter clean
- flutter pub get
- gem install bundler
- bundle install
code_quality:
stage: test
# tags:
# - flutter
image: "cirrusci/flutter:stable"
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
# tags:
# - flutter
image: "cirrusci/flutter:stable"
before_script:
- flutter pub get
- pub run build_runner build --delete-conflicting-outputs
- pub global activate junitreport
- export PATH="$PATH:$HOME/.pub-cache/bin"
script:
- flutter test --coverage
- genhtml coverage/lcov.info --output=coverage
coverage: '/lines\.*: \d+\.\d+\%/'
artifacts:
name: coverage
paths:
- $CI_PROJECT_DIR/coverage
reports:
junit: report.xml