Repository navigation
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
77 lines (70 loc) · 1.5 KB
/
Copy path.gitlab-ci.yml
File metadata and controls
77 lines (70 loc) · 1.5 KB
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
image: cirrusci/flutter:3.3.0
cache:
paths:
- /flutter/bin/cache/dart-sdk
include:
- template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'
stages:
- check
- test
- build
- release
# Check app for format and lint exceptions (fail fast)
Check App:
stage: check
except:
- main
before_script:
- flutter --version
script:
- make format
- make clean
- make lint
artifacts:
untracked: true
paths:
- lib/
# Check code quality
code_quality:
stage: test
except:
- main
before_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- flutter pub global activate dart_code_metrics
script:
- metrics lib -r codeclimate > gl-code-quality-report.json
artifacts:
reports:
codequality: gl-code-quality-report.json
# Run tests and report quality
Test:
stage: test
except:
- main
before_script:
- export PATH="$PATH":"$HOME/.pub-cache/bin"
- flutter pub global activate junitreport
script:
- make clean
- 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
# Build the app to check if release builds still work
Build Android (.apk):
stage: build
except:
- main
script:
- make build-android-apk
artifacts:
expire_in: 2 days
paths:
- build-output/app.apk