Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Action - Code Analysis #93

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/code-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Code Analysis

on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '**.md'

jobs:
code-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- name: Prepare dependencies
run: |
flutter --version
flutter pub get
- name: Check Dart code formatting
run: |
dart format . -o none --set-exit-if-changed
- name: Analyze Dart code
run: |
flutter analyze .
- name: Generate dartdoc
run: |
dart pub global activate dartdoc
dart pub global run dartdoc .

test:
needs: [code-analysis]
runs-on: ubuntu-latest
strategy:
matrix:
flutter-version: ['']
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: ${{ matrix.flutter-version }}
- name: Prepare dependencies
run: |
flutter --version
flutter pub get
- name: Test
run: flutter test
2 changes: 1 addition & 1 deletion example/lib/features/scene/chat_demo/page/chat_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ class _ChatPageState extends State<ChatPage> with WidgetsBindingObserver {
}

addUnreadTipView() {
Overlay.of(pageOverlayContext!)?.insert(OverlayEntry(
Overlay.of(pageOverlayContext!).insert(OverlayEntry(
builder: (BuildContext context) => UnconstrainedBox(
child: CompositedTransformFollower(
link: layerLink,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class _VideoWidgetState extends State<VideoWidget> {
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network(widget.url);
_controller = VideoPlayerController.networkUrl(Uri.parse(widget.url));
_initializeVideoPlayerFuture = _controller.initialize().then((_) {
setState(() {});
});
Expand Down