-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmelos.yaml
164 lines (131 loc) · 5.85 KB
/
melos.yaml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
name: encointer
sdkPath: ".flutter"
packages:
- app
- packages/**
command:
bootstrap:
runPubGetInParallel: false
usePubspecOverrides: true
# Notes:
# 1. On windows the multiline operator doesn't work in most cases, so we should try to have one liner scripts commands
# connected with '&&'.
# 2. make sure that you have installed the project dependencies with ./flutter/bin/dart pub get. Otherwise, melos
# will fallback to the globally installed version and errors might occur.
#
# Cross platform linebreaks:
# * Can only be used with a `melos exec` command, which must be after directly before the command to be executed. So
# after the `--` if a filter is used.
# * Only works with the `>-` multiline operator for windows support.
#
# For more complex scenarios, we can consider writing cross-platform dart scripts as mentioned in this issue:
# https://github.com/invertase/melos/issues/122
scripts:
format:
run: dart format . --line-length 120
description: "Format all Dart code"
format-check:
run: dart format . --line-length 120 --set-exit-if-changed
description: "Check format all Dart code"
analyze:
run: dart analyze
description: "Analyze all Dart code"
analyze-check:
run: dart analyze --fatal-warnings
description: "Analyze all Dart code and exit if there are any fatal warnings"
flutter-clean:
run: >-
dart run melos exec -- \
flutter clean
description: "Get pub dependencies"
pub-get:
run: >-
dart run melos exec -- \
flutter pub get
description: "Get pub dependencies"
unit-test:
run: flutter test
description: "Run unit tests (all packages)"
doctor:
run: flutter doctor
description: "Run Flutter doctor"
run-build-runner:
run: >-
dart run melos exec -c 1 --depends-on="build_runner" -- \
flutter pub run build_runner build --delete-conflicting-outputs
description: "Generate code with build_runner"
# Note: This produces bad filepaths on windows. Need to run this script afterwards:
# `./scripts/replace_backslash_in_dart_files.sh packages/ew_polkadart`.
run-polkadart-generate:
run: >-
cd packages/ew_polkadart && dart run polkadart_cli:generate -v
description: "Generate encointer typdedefs with polkadart"
# Unit test Encointer Wallet with tag
unit-test-app-exclude-encointer-node-e2e:
run: >-
dart run melos exec --scope="encointer_wallet" -- \
flutter test --exclude-tags encointer-node-e2e
description: "Run unit tests excluding the `encointer-node-e2e` tag"
unit-test-app-with-encointer-node-e2e:
run: >-
dart run melos exec --scope="encointer_wallet" -- \
flutter test --tags encointer-node-e2e
description: "Run unit tests with the `encointer-node-e2e` tag"
unit-test-packages:
run: >-
dart run melos exec --ignore="encointer_wallet" -- \
flutter test
description: "Run unit tests with the `encointer-node-e2e` tag"
# Run Encointer Wallet
run-android:
run: cd app && flutter run --flavor dev
description: "Run encointer_wallet on an Android platform"
run-ios:
run: cd app && flutter run
description: "Run encointer_wallet on an iOS platform"
# Build apk for androids splitted per Application Binary Interface (abi)
build-apk-split:
run: cd app && flutter build apk --split-per-abi --flavor dev
description: "Build an APK file"
build-appbundle-play:
run: cd app && flutter build appbundle --release --flavor play
description: "Build an appbundle file ready to be submitted to the google play console"
precache-ios:
run: cd app && flutter precache –ios
description: "Precache IOS - needed for manual pod install"
build-ipa-release:
run: cd app && flutter build ios --release --export-options-plist ios/ExportOptions.plist
description: "Build a signed IPA"
build-ipa-debug:
run: cd app && flutter build ios --no-codesign
description: "Build a signed IPA"
# Integration test Encointer Wallet
integration-app-test-android:
run: cd app && flutter drive --target=test_driver/app.dart --flavor dev
description: "Run integration test on Android"
integration-app-test-android-screenshot:
# screenshots are not possible with the impeller engine
run: cd app && flutter drive --no-enable-impeller --target=test_driver/app.dart --flavor dev --dart-define=locales=en
description: "Run integration test on Android with screenshot capturing enabled."
integration-app-test-ios:
run: cd app && flutter drive --target=test_driver/app.dart
description: "Run integration test on iOS"
integration-app-test-ios-screenshot:
run: cd app && flutter drive --target=test_driver/app.dart --dart-define=locales=en
description: "Run integration test on IOS with screenshot capturing enabled."
integration-app-test-ios-screenshot-multi-language:
run: cd app && flutter drive --target=test_driver/app.dart --dart-define=locales=de,fr,ru,en
description: "Run integration test on IOS with screenshot multi language capturing enabled."
integration-app-test-android-screenshot-multi-language:
run: cd app && flutter drive --target=test_driver/app.dart --flavor dev --dart-define=locales=de,fr,ru,en
description: "Run integration test on Android with screenshot multi language capturing enabled. "
integration-scan-test-android:
# screenshots are not possible with the impeller engine
run: cd app && flutter drive --no-enable-impeller --target=test_driver/scan_page.dart --flavor dev
description: "Run integration test for QR scan on Android"
integration-scan-test-ios:
run: cd app && flutter drive --target=test_driver/scan_page.dart
description: "Run integration test for QR scan on iOS"
flutter-config-no-analytics:
run: cd app && flutter config --no-analytics
description: "Disables the analytics data in the local configuration file of the Flutter tool"