This repository has been archived by the owner on Aug 31, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
73 lines (69 loc) · 2.07 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
71
72
73
before_script:
- export LC_ALL=fr_FR.UTF-8
- export LANG=fr_FR.UTF-8
- export PROJECT_VERSION=$(cider version)
- export CI_PUSH_REPO=`echo $CI_REPOSITORY_URL | perl -pe 's#.*@(.+?(\:\d+)?)/#git@\1:#'`
- cd example/
- flutter clean
- cd ../
- flutter clean
- flutter pub get
stages:
- 🛠 Setup
- 🔮 Test
variables:
APP_FOLDER: "pal"
UPLOADER: "/Users/apparence/dropbox-uploader/dropbox_uploader.sh"
UPLOADER_CONFIG: "/Users/apparence/dropbox-uploader/dropbox_uploader.cfg"
########
# Setup
########
setup:
stage: 🛠 Setup
tags:
- apparence
- macos
except:
- tags
script:
- flutter channel stable
- flutter upgrade
- flutter clean
#######
# Tests
#######
test:example:
stage: 🔮 Test
tags:
- apparence
- macos
variables:
CODE_COV_TOKEN: "7a600e86-7222-4af2-aad5-10b945a4442b"
script:
- cd example/
- flutter test --coverage test
- bash <(curl -s https://codecov.io/bash) -t "${CODE_COV_TOKEN}"
- genhtml coverage/lcov.info --output=coverage
- zip -r coverage/coverage_report.zip coverage/
- sh "${UPLOADER}" -f "${UPLOADER_CONFIG}" mkdir "${APP_FOLDER}/${PROJECT_VERSION}/example/" &>/dev/null || echo "Target folder exists"
- sh "${UPLOADER}" -f "${UPLOADER_CONFIG}" upload "coverage/coverage_report.zip" "${APP_FOLDER}/${PROJECT_VERSION}/example/coverage_report.zip"
artifacts:
paths:
- example/coverage/
test:main:
stage: 🔮 Test
tags:
- apparence
- macos
variables:
CODE_COV_TOKEN: "7a600e86-7222-4af2-aad5-10b945a4442b"
script:
- flutter test --coverage test
- bash <(curl -s https://codecov.io/bash) -t "${CODE_COV_TOKEN}"
- genhtml coverage/lcov.info --output=coverage
- zip -r coverage/coverage_report.zip coverage/
- sh "${UPLOADER}" -f "${UPLOADER_CONFIG}" mkdir "${APP_FOLDER}/${PROJECT_VERSION}/plugin/" &>/dev/null || echo "Target folder exists"
- sh "${UPLOADER}" -f "${UPLOADER_CONFIG}" upload "coverage/coverage_report.zip" "${APP_FOLDER}/${PROJECT_VERSION}/plugin/coverage_report.zip"
artifacts:
paths:
- coverage/