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

Create dart.yml #12

Merged
merged 3 commits into from
Dec 14, 2023
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
30 changes: 30 additions & 0 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Execute Tests on PR
on:
push:
pull_request:
branches: [main]

jobs:

runUnitTest:
name: Execute Unit/Widget tests

runs-on: macos-latest
steps:

- name: Checkout Code
uses: actions/checkout@v3

- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: 'stable'

- name: Lint
run: dart format --output=none --set-exit-if-changed .

- name: Pub Upgrade
run: flutter pub upgrade

# - name: Run Unit Tests / Widget Tests
# run: flutter test
8 changes: 7 additions & 1 deletion lib/Provider/todo_schema.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
class Todo {
import 'package:equatable/equatable.dart';

// ignore: must_be_immutable
class Todo extends Equatable {
String todo;
String description;
String id;
Expand All @@ -20,4 +23,7 @@ class Todo {
id: m['_id'],
isCompleted: m['is_completed']);
}

@override
List<String> get props => [id];
}
4 changes: 1 addition & 3 deletions lib/button/done_list_page_buttons/done_delete.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@ class DoneDeleteButton extends ConsumerWidget {
return IconButton.filled(
color: Theme.of(context).cardColor,
onPressed: () {
ref
.read(futureTodoListProvider.notifier)
.markedDelete(itr: todo);
ref.read(futureTodoListProvider.notifier).markedDelete(itr: todo);
},
icon: const Icon(Icons.delete),
);
Expand Down
2 changes: 1 addition & 1 deletion lib/screens/todo_list_screen/no_to_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ class _NoTodoListState extends State<NoTodoList> {
],
);
}
}
}
3 changes: 3 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ dependencies:
flutter_cache_manager: ^3.3.1
path_provider: ^2.1.1
http: ^1.1.0
equatable: ^2.0.5


dev_dependencies:
Expand All @@ -66,6 +67,8 @@ dev_dependencies:
flutter_lints: ^3.0.1
riverpod_generator: ^2.3.1
riverpod_lint: ^2.0.3
integration_test:
sdk: flutter

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