Skip to content

Commit

Permalink
Disable analyzer for releases (#1142)
Browse files Browse the repository at this point in the history
  • Loading branch information
marandaneto authored Nov 18, 2022
1 parent 08a7b4f commit cdf7172
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/analyze.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
access_token: ${{ github.token }}

analyze:
# `invertase/github-action-dart-analyzer` is using `flutter pub upgrade` instead of `get`,
# which ignores pubspec.yaml `dependency_overrides`. Because of that, all `release/*` branches are failing,
# because the package cannot find the "about to be released" version of our sentry-dart package that it depends on.
if: ${{ !startsWith(github.ref, 'refs/heads/release/') && inputs.panaThreshold > 0 }}
runs-on: ubuntu-latest
timeout-minutes: 20
defaults:
Expand Down
15 changes: 15 additions & 0 deletions flutter/test/sentry_navigator_observer_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -769,3 +769,18 @@ ISentrySpan getMockSentryTracer({String? name}) {
when(tracer.name).thenReturn(name ?? 'name');
return tracer;
}

extension RouteSettingsExtensions on RouteSettings {
/// Creates a copy of this route settings object with the given fields
/// replaced with the new values.
/// Flutter 3.6 beta removed copyWith but we use it for testing
RouteSettings copyWith({
String? name,
Object? arguments,
}) {
return RouteSettings(
name: name ?? this.name,
arguments: arguments ?? this.arguments,
);
}
}

0 comments on commit cdf7172

Please sign in to comment.