Skip to content

Commit

Permalink
Fix/prepare for dev release (#1227)
Browse files Browse the repository at this point in the history
* improve patrol-prepare GitHub Action

* fix warnings raised by `flutter pub publish --dry-run` that blocked releasing
  • Loading branch information
bartekpacia authored Apr 25, 2023
1 parent c7ae542 commit f348e5c
Show file tree
Hide file tree
Showing 8 changed files with 1,797 additions and 646 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/patrol-prepare.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,29 +145,37 @@ jobs:
run: flutter pub get

- name: flutter test
if: always()
run: flutter test --coverage

- name: flutter analyze
if: always()
run: flutter analyze

- name: flutter format
if: always()
run: flutter format --set-exit-if-changed .

- name: flutter pub publish --dry-run
if: always()
run: flutter pub publish --dry-run

- name: flutter pub get (example app)
if: always()
working-directory: ./packages/patrol/example
run: flutter pub get

- name: flutter format (example app)
if: always()
working-directory: ./packages/patrol/example
run: flutter format --set-exit-if-changed .

- name: flutter analyze (example app)
if: always()
working-directory: ./packages/patrol/example
run: flutter analyze --no-fatal-infos

- name: flutter test (example app)
if: always()
working-directory: ./packages/patrol/example
run: flutter test
2 changes: 1 addition & 1 deletion packages/patrol/lib/src/binding.dart
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class PatrolBinding extends IntegrationTestWidgetsFlutterBinding {
dartFileName: _currentDartTestFile!,
passed: passed,
details: _testResults[_currentDartTestFile!] is Failure
? (_testResults[_currentDartTestFile!] as Failure).details
? (_testResults[_currentDartTestFile!] as Failure?)?.details
: null,
);
}
Expand Down
12 changes: 4 additions & 8 deletions packages/patrol/lib/src/common.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// ignore_for_file: invalid_use_of_internal_member,
// depend_on_referenced_packages, implementation_imports
// ignore_for_file: invalid_use_of_internal_member, implementation_imports

import 'package:flutter_test/flutter_test.dart';
import 'package:integration_test/integration_test.dart';
Expand Down Expand Up @@ -99,21 +98,18 @@ void patrolTest(
// "integration_test/examples" directory, we assume that the name of the
// immediate parent group is "examples/example_test.dart".
//
// It's good enough for a POC.
// It's good enough for now.

final parentGroupName = Invoker.current!.liveTest.groups.last.name;

print('patrolTest(): test "$parentGroupName" registered and waiting');
final requestedToExecute = await patrolBinding.patrolAppService
.waitForRunRequest(parentGroupName);
.waitForExecutionRequest(parentGroupName);

if (!requestedToExecute) {
return;
}
print('patrolTest(): requested execution of test "$parentGroupName"');
}

// await nativeAutomator?.configure(); // Move to bundled_test.dart
// await nativeAutomator?.configure(); // TODO: Move to bundled_test.dart or add again

final patrolTester = PatrolTester(
tester: widgetTester,
Expand Down
1,931 changes: 1,374 additions & 557 deletions packages/patrol/lib/src/native/contracts/contracts.pb.dart

Large diffs are not rendered by default.

92 changes: 72 additions & 20 deletions packages/patrol/lib/src/native/contracts/contracts.pbenum.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f348e5c

Please sign in to comment.