Skip to content

Commit bfd04fb

Browse files
wip: implement dynamic CircleCI config with path-filtering
- Updated root .circleci/config.yml to include path-filtering orb - Added continuation steps for dynamically processing package-specific configs - Marked package-specific config.yml files as version 2.1 for compatibility - Adjusted workflows to trigger on changes to specific package paths - Testing and validation of dynamic CI configuration in progress
1 parent f1ef1c5 commit bfd04fb

File tree

15 files changed

+766
-63
lines changed

15 files changed

+766
-63
lines changed

.circleci/config.yml

+625
Large diffs are not rendered by default.

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
**/*.iml
44
**/pubspec.lock
55
**/pubspec_overrides.yaml
6+
**/.fvm

example/pubspec.lock

Whitespace-only changes.

melos.yaml

+29-6
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,36 @@ packages:
55

66
scripts:
77
analyze:
8-
exec: dart analyze .
8+
run: melos exec "dart analyze ."
9+
10+
format:
11+
run: melos exec "dart format . --set-exit-if-changed"
12+
913
pigeon:
10-
exec: sh scripts/pigeon.sh
14+
run: melos exec "sh scripts/pigeon.sh"
1115
packageFilters:
1216
fileExists: 'scripts/pigeon.sh'
1317

14-
command:
15-
bootstrap:
16-
hooks:
17-
post: melos pigeon
18+
generate:
19+
run: melos exec "dart run build_runner build -d"
20+
description: Build all generated files for Dart & Flutter packages in this project.t
21+
packageFilters:
22+
dependsOn: build_runner
23+
24+
test:
25+
run: melos exec "flutter test"
26+
description: Tests all packages.
27+
packageFilters:
28+
dependsOn: flutter_test
29+
30+
dryPublish:
31+
run: melos exec "flutter pub publish --dry-run"
32+
description: Tests publishing (dry run).
33+
packageFilters:
34+
flutter: true
35+
36+
score:
37+
run: melos exec "dart run pana --no-warning --exit-code-threshold 0"
38+
packageFilters:
39+
flutter: true
40+
dependsOn: pana
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,51 @@
1-
version: 2
1+
version: 2.1
22
jobs:
3-
test:
3+
instabug_dart_http_adapter_test:
44
docker:
55
- image: cirrusci/flutter
66
steps:
77
- checkout
8-
- run: flutter doctor
9-
- run: flutter pub get
10-
- run: flutter test
11-
- run: dart analyze --fatal-warnings lib
12-
- run: flutter pub publish --dry-run
8+
- run:
9+
name: Flutter doctor
10+
command: flutter doctor
11+
- run:
12+
name: Install Flutter Packages
13+
working_directory: packages/instabug_dart_http_adapter
14+
command: flutter pub get
15+
- run:
16+
name: Generate code with build runner
17+
working_directory: packages/instabug_dart_http_adapter
18+
command: dart run build_runner build --delete-conflicting-outputs
19+
- run:
20+
name: Run tests
21+
working_directory: packages/instabug_dart_http_adapter
22+
command: flutter test
23+
- run:
24+
name: Dart Analysis
25+
working_directory: packages/instabug_dart_http_adapter
26+
command: dart analyze --fatal-warnings lib
27+
- run:
28+
name: Publish dry run
29+
working_directory: packages/instabug_dart_http_adapter
30+
command: flutter pub publish --dry-run
1331

1432
release:
1533
docker:
1634
- image: cirrusci/flutter
35+
working_directory: packages/instabug_dart_http_adapter
1736
steps:
1837
- checkout
1938
- run: chmod +x release.sh
20-
- run: ./release.sh
39+
- run: ./release.sh
2140

2241
workflows:
23-
version: 2
24-
build-test:
42+
build-instabug-dart-http-adapter-test:
2543
jobs:
26-
- test
44+
- instabug_dart_http_adapter_test
2745
- hold:
2846
type: approval
2947
requires:
30-
- test
48+
- instabug_dart_http_adapter_test
3149
filters:
3250
branches:
3351
only: master
@@ -36,4 +54,4 @@ workflows:
3654
- hold
3755
filters:
3856
branches:
39-
only: master
57+
only: master

packages/instabug_dart_http_adapter/.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Generated files
2+
*.mocks.dart
3+
14
# Miscellaneous
25
*.class
36
*.log
@@ -74,4 +77,4 @@ coverage/
7477
!**/ios/**/default.mode2v3
7578
!**/ios/**/default.pbxuser
7679
!**/ios/**/default.perspectivev3
77-
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
80+
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

packages/instabug_dart_http_adapter/example/lib/main.dart

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
1+
import 'dart:developer';
2+
13
import 'package:flutter/material.dart';
24
import 'package:instabug_http_client/instabug_http_client.dart';
35
import 'package:instabug_flutter/instabug_flutter.dart';
46

57
Future<void> main() async {
68
runApp(const MyApp());
7-
Instabug.start(
8-
'ed6f659591566da19b67857e1b9d40ab', [InvocationEvent.floatingButton]);
9+
Instabug.init(
10+
token: 'ed6f659591566da19b67857e1b9d40ab',
11+
invocationEvents: [InvocationEvent.floatingButton]);
912
final client = InstabugHttpClient();
1013
final response = await client.get(Uri.parse('https://google.com'));
11-
print(response.body);
14+
log(response.body);
1215
}
1316

1417
class MyApp extends StatelessWidget {
@@ -58,7 +61,7 @@ class _MyHomePageState extends State<MyHomePage> {
5861
),
5962
Text(
6063
'$_counter',
61-
style: Theme.of(context).textTheme.headline4,
64+
style: Theme.of(context).textTheme.headlineMedium,
6265
),
6366
],
6467
),

packages/instabug_dart_http_adapter/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ version: 2.3.0
66
homepage: https://github.com/Instabug/Instabug-Flutter#readme
77

88
environment:
9-
sdk: '>=2.12.0 <3.0.0'
9+
sdk: '>=2.12.0 <4.0.0'
1010

1111
dependencies:
1212
flutter:

packages/instabug_dart_http_adapter/test/instabug_http_client_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import 'package:mockito/mockito.dart';
1414

1515
import 'instabug_http_client_test.mocks.dart';
1616

17-
@GenerateMocks([
17+
@GenerateMocks(<Type>[
1818
InstabugHttpLogger,
1919
InstabugHttpClient,
2020
])

packages/instabug_dio_interceptor/.circleci/config.yml

+30-13
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,50 @@
1-
version: 2
1+
version: 2.1
22
jobs:
3-
test:
3+
instabug_dio_interceptor_test:
44
docker:
55
- image: cirrusci/flutter
66
steps:
77
- checkout
8-
- run: flutter doctor
9-
- run: flutter pub get
10-
- run: flutter pub run build_runner build --delete-conflicting-outputs
11-
- run: flutter test
12-
- run: flutter analyze .
13-
- run: flutter pub publish --dry-run
14-
8+
- run:
9+
name: Flutter doctor
10+
command: flutter doctor
11+
- run:
12+
name: Install Flutter Packages
13+
working_directory: packages/instabug_dio_interceptor
14+
command: flutter pub get
15+
- run:
16+
name: Generate code with build runner
17+
working_directory: packages/instabug_dart_http_adapter
18+
command: dart run build_runner build --delete-conflicting-outputs
19+
- run:
20+
name: Run tests
21+
working_directory: packages/instabug_dio_interceptor
22+
command: flutter test
23+
- run:
24+
name: Dart Analysis
25+
working_directory: packages/instabug_dio_interceptor
26+
command: dart analyze .
27+
- run:
28+
name: Publish dry run
29+
working_directory: packages/instabug_dio_interceptor
30+
command: flutter pub publish --dry-run
31+
1532
release:
1633
docker:
1734
- image: cirrusci/flutter
35+
working_directory: packages/instabug_dio_interceptor
1836
steps:
1937
- checkout
2038
- run: ./release.sh
2139

2240
workflows:
23-
version: 2
24-
build-test:
41+
build-instabug-dio-interceptor-test:
2542
jobs:
26-
- test
43+
- instabug_dio_interceptor_test
2744
- hold:
2845
type: approval
2946
requires:
30-
- test
47+
- instabug_dio_interceptor_test
3148
filters:
3249
branches:
3350
only: master

packages/instabug_dio_interceptor/pubspec.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,11 @@ dependencies:
1313
flutter:
1414
sdk: flutter
1515
instabug_flutter: '>=11.0.0 <13.0.0'
16-
1716
dev_dependencies:
1817
build_runner: ^2.0.3
1918
flutter_test:
2019
sdk: flutter
21-
mockito: 5.4.4
20+
mockito: ^5.0.10
2221

2322
# For information on the generic Dart part of this file, see the
2423
# following page: https://dart.dev/tools/pub/pubspec

0 commit comments

Comments
 (0)