Skip to content

Commit cdf7172

Browse files
authored
Disable analyzer for releases (#1142)
1 parent 08a7b4f commit cdf7172

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.github/workflows/analyze.yml

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ jobs:
2424
access_token: ${{ github.token }}
2525

2626
analyze:
27+
# `invertase/github-action-dart-analyzer` is using `flutter pub upgrade` instead of `get`,
28+
# which ignores pubspec.yaml `dependency_overrides`. Because of that, all `release/*` branches are failing,
29+
# because the package cannot find the "about to be released" version of our sentry-dart package that it depends on.
30+
if: ${{ !startsWith(github.ref, 'refs/heads/release/') && inputs.panaThreshold > 0 }}
2731
runs-on: ubuntu-latest
2832
timeout-minutes: 20
2933
defaults:

flutter/test/sentry_navigator_observer_test.dart

+15
Original file line numberDiff line numberDiff line change
@@ -769,3 +769,18 @@ ISentrySpan getMockSentryTracer({String? name}) {
769769
when(tracer.name).thenReturn(name ?? 'name');
770770
return tracer;
771771
}
772+
773+
extension RouteSettingsExtensions on RouteSettings {
774+
/// Creates a copy of this route settings object with the given fields
775+
/// replaced with the new values.
776+
/// Flutter 3.6 beta removed copyWith but we use it for testing
777+
RouteSettings copyWith({
778+
String? name,
779+
Object? arguments,
780+
}) {
781+
return RouteSettings(
782+
name: name ?? this.name,
783+
arguments: arguments ?? this.arguments,
784+
);
785+
}
786+
}

0 commit comments

Comments
 (0)