-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathpubspec.yaml
More file actions
224 lines (207 loc) · 6.93 KB
/
pubspec.yaml
File metadata and controls
224 lines (207 loc) · 6.93 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
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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
name: oidc_workspace
publish_to: none
environment:
sdk: ^3.9.0
flutter: '>=3.35.0 <4.0.0'
workspace:
- packages/oidc
- packages/oidc/example
- packages/oidc_android
- packages/oidc_android/example
- packages/oidc_cli
- packages/oidc_core
- packages/oidc_default_store
- packages/oidc_desktop
- packages/oidc_flutter_appauth
- packages/oidc_ios
- packages/oidc_linux
- packages/oidc_loopback_listener
- packages/oidc_macos
- packages/oidc_platform_interface
- packages/oidc_web
- packages/oidc_web/example
- packages/oidc_web_core
- packages/oidc_web_core/example
- packages/oidc_windows
dev_dependencies:
melos: ^7.1.1
dependency_overrides:
matcher: 0.12.18
melos:
repository: https://github.com/Bdaya-Dev/oidc
command:
bootstrap:
runPubGetInParallel: false
clean:
hooks:
post: |
melos exec --flutter -- "flutter clean" &&
rm -rf coverage &&
rm -rf pubspec.lock &&
melos exec --dir-exists coverage -- "rm -rf coverage"
scripts:
pana:
run: melos exec -c 1 "pana"
description: Run pana on all the projects
packageFilters:
noPrivate: true
generate:dart:
run: melos exec -c 1 --depends-on="build_runner" -- "dart run build_runner build --delete-conflicting-outputs"
description: Build all generated files for Dart packages in this project.
analyze: # ------ taken from cfug/dio ------------
description: Analyze all packages
exec: dart analyze
format:
description: Format check all packages
exec: dart format --set-exit-if-changed .
format:fix:
description: Format all packages
exec: dart format .
test:
name: All tests
run: |
melos run test:vm
TEST_PLATFORM=chrome melos run test:web
TEST_PLATFORM=firefox melos run test:web
melos run test:flutter
test:vm:
name: Dart VM tests
exec: |
if [ "$TARGET_DART_SDK" = "min" ]; then
dart test --chain-stack-traces
else
dart test --coverage=coverage/vm --chain-stack-traces
fi
packageFilters:
flutter: false
dirExists: test
ignore:
- "*web*"
test:web:
name: Dart Web tests
run: |
melos run test:web:chrome
melos run test:web:firefox
test:web:chrome:
name: Dart Web tests in chrome
run: melos run test:web:single
env:
TEST_PLATFORM: chrome
WITH_WASM: false
test:web:firefox:
name: Dart Web tests in firefox
run: melos run test:web:single
env:
TEST_PLATFORM: firefox
MOZ_HEADLESS: "1"
WITH_WASM: false
test:web:single:
name: Dart Web tests in a browser
env:
WITH_WASM: false
# We have to use --timeout 60m alongside --ignore-timeouts
exec: |
if [ "$TARGET_DART_SDK" = "min" ]; then
dart test --timeout 60m --ignore-timeouts --platform ${TEST_PLATFORM} --chain-stack-traces
else
dart test --timeout 60m --ignore-timeouts --platform ${TEST_PLATFORM} --coverage=coverage/${TEST_PLATFORM} --chain-stack-traces
if [ "$WITH_WASM" = "true" ]; then
dart test --timeout 60m --ignore-timeouts --platform ${TEST_PLATFORM} --coverage=coverage/${TEST_PLATFORM} --chain-stack-traces --compiler=dart2wasm
fi
fi
packageFilters:
dirExists: test
flutter: false
ignore:
- oidc_cli
remove_dart_test_yaml:
name: Remove dart_test.yaml
run: find . -type f -name 'dart_test.yaml' -delete
test:flutter:
name: Flutter tests
exec: flutter test --coverage --branch-coverage
packageFilters:
flutter: true
dirExists: test
ignore:
- "*example*"
integration_test:android:
name: Flutter Android Integration tests
exec: flutter test integration_test --coverage --coverage-package oidc* --branch-coverage -d android --coverage-path coverage/android-coverage.info --dart-define=CI=true
packageFilters:
flutter: true
dirExists:
- integration_test
- android
integration_test:ios:
name: Flutter iOs Integration tests
exec: flutter test integration_test --coverage --coverage-package oidc* --branch-coverage --ignore-timeouts -d iPhone --coverage-path coverage/ios-coverage.info --dart-define=CI=true
packageFilters:
flutter: true
dirExists:
- integration_test
- ios
integration_test:macos:
name: Flutter MacOs Integration tests
exec: flutter test integration_test --coverage --branch-coverage --coverage-package oidc* -d macos --coverage-path coverage/macos-coverage.info --dart-define=CI=true
packageFilters:
flutter: true
dirExists:
- integration_test
- macos
integration_test:linux:
name: Flutter Linux Integration tests
exec: xvfb-run flutter test integration_test --coverage --branch-coverage --coverage-package oidc* -d linux --coverage-path coverage/linux-coverage.info --dart-define=CI=true
packageFilters:
flutter: true
dirExists:
- integration_test
- linux
integration_test:windows:
name: Flutter Windows Integration tests
exec: flutter test integration_test --coverage --branch-coverage --coverage-package oidc* -d windows --coverage-path coverage/windows-coverage.info --dart-define=CI=true
packageFilters:
flutter: true
dirExists:
- integration_test
- windows
test:coverage:
name: Run all tests and combine coverage
run: |
melos run test
melos run coverage:format
upgrade:dart:
name: Upgrade Dart package deps
exec: dart pub upgrade
packageFilters:
flutter: false
upgrade:flutter:
name: Upgrade Flutter package deps
exec: flutter pub upgrade
packageFilters:
flutter: true
coverage:clean:
name: Clear coverage
exec: rm -rf coverage
coverage:format:
name: Format coverage
run: |
dart pub global activate coverage
melos run coverage:format:package
coverage:format:package:
name: Format coverage for each package
exec: dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
packageFilters:
dirExists: coverage
coverage:combine:
name: Combine & convert coverage report
run: |
rm -rf coverage
dart pub global activate combine_coverage
dart pub global activate remove_from_coverage
melos run coverage:format
dart pub global run combine_coverage --repo-path=$pwd
dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '\.g\.dart$'
oidc:activate:
name: Activate OIDC CLI locally
run: dart pub global activate --source path packages/oidc_cli