-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
70 lines (64 loc) · 1.58 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
stages:
- test
- deploy
# code_quality:
# stage: code_quality
# image: "ghcr.io/cirruslabs/flutter:3.10.2"
# before_script:
# - flutter 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: "ghcr.io/cirruslabs/flutter:3.10.3"
before_script:
- flutter pub global activate junitreport
- export PATH="$PATH:$HOME/.pub-cache/bin"
script:
- flutter test --coverage --dart-define=apiURL=http://localhost:7070
# test_coverage:
# stage: test_coverage
# image: "ghcr.io/cirruslabs/flutter:3.10.3"
# before_script:
# - flutter 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
deploy_dev:
stage: deploy
script:
- echo "Deploying to Dev environment..."
environment:
name: dev
only:
- dev
deploy_stg:
stage: deploy
script:
- echo "Deploying to Staging environment..."
environment:
name: stg
only:
- stg
deploy_prd:
stage: deploy
script:
- echo "Deploying to Production environment..."
environment:
name: prd
when: manual
only:
- main