-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
50 lines (46 loc) · 1.4 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# 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
code_quality:
stage: test
image: "cirrusci/flutter:$FLUTTER_VERSION"
before_script:
- pub global activate dart_code_metrics
- export PATH="$PATH":"$HOME/.pub-cache/bin"
script:
- cd mob_app
- metrics lib -r codeclimate > ../gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
test:
stage: test
image: "cirrusci/flutter:$FLUTTER_VERSION"
before_script:
- pub global activate junitreport
- export PATH="$PATH":"$HOME/.pub-cache/bin"
script:
- cd mob_app
- 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/mob_app/coverage
reports:
junit: mob_app/report.xml
build:
stage: deploy
only:
- tags
image: "cirrusci/flutter:$FLUTTER_VERSION"
script:
- cd mob_app
- flutter build apk --split-per-abi
artifacts:
name: build_artifacts
paths:
- $CI_PROJECT_DIR/mob_app/build/app/outputs/apk/release