Skip to content

Commit eb206d5

Browse files
committed
Merge branch 'release/1.3' into main
2 parents 2cffd89 + 742177b commit eb206d5

File tree

10 files changed

+95
-53
lines changed

10 files changed

+95
-53
lines changed
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
1+
#
2+
# Copyright (c) 2021 tokku5552
3+
#
4+
# This software is released under the MIT License.
5+
# https://opensource.org/licenses/mit-license.php
6+
#
7+
#
18
name: Flutter_Analyzer
29

310
on:
411
pull_request:
512
types: [opened, synchronize]
613
push:
714
branches:
8-
- master
15+
- main
16+
- develop
917

1018
jobs:
1119
flutter_analyze:
1220
runs-on: ubuntu-latest
13-
timeout-minutes: 1
21+
timeout-minutes: 10
1422
steps:
1523
- uses: actions/checkout@v2
1624
with:
1725
fetch-depth: 1
1826
- uses: subosito/flutter-action@v1
1927
with:
20-
channel: 'beta'
28+
channel: 'stable'
2129
- run: flutter pub get
2230
- run: flutter analyze

.github/workflows/flutter_test.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#
2+
# Copyright (c) 2021 tokku5552
3+
#
4+
# This software is released under the MIT License.
5+
# https://opensource.org/licenses/mit-license.php
6+
#
7+
#
8+
name: Flutter_Test
9+
10+
on:
11+
pull_request:
12+
types: [opened, synchronize]
13+
push:
14+
branches:
15+
- main
16+
- develop
17+
18+
jobs:
19+
flutter_test:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 10
22+
steps:
23+
- uses: actions/checkout@v2
24+
with:
25+
fetch-depth: 1
26+
- uses: subosito/flutter-action@v1
27+
with:
28+
channel: 'stable'
29+
- run: flutter pub get
30+
- run: flutter test --no-test-assets --coverage --coverage-path=~/coverage/lcov.info
31+
- uses: codecov/codecov-action@v1
32+
with:
33+
token: ${{secrets.CODECOV_TOKEN}}
34+
file: ~/coverage/lcov.info

analysis_options.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
# https://pub.dev/packages/pedantic_mono
2-
include: package:pedantic_mono/analysis_options.yaml
1+
include: package:pedantic/analysis_options.yaml

lib/presentation/todo_list/todo_list_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class TodoListPage extends StatelessWidget {
3434
return PopupMenuButton(
3535
initialValue: 'model.viewCompletedItems',
3636
onSelected: (String s) async {
37-
model.changeViewCompletedItems(s);
37+
await model.changeViewCompletedItems(s);
3838
await model.getTodoList();
3939
},
4040
itemBuilder: (BuildContext context) {
@@ -133,6 +133,6 @@ class TodoListPage extends StatelessWidget {
133133
fullscreenDialog: true,
134134
),
135135
);
136-
model.getTodoList();
136+
await model.getTodoList();
137137
}
138138
}

pubspec.lock

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -142,13 +142,13 @@ packages:
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144144
version: "0.0.4+3"
145-
pedantic_mono:
145+
pedantic:
146146
dependency: "direct dev"
147147
description:
148-
name: pedantic_mono
148+
name: pedantic
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "1.10.0+3"
151+
version: "1.9.2"
152152
platform:
153153
dependency: transitive
154154
description:
@@ -176,7 +176,7 @@ packages:
176176
name: provider
177177
url: "https://pub.dartlang.org"
178178
source: hosted
179-
version: "4.3.2+2"
179+
version: "4.3.3"
180180
shared_preferences:
181181
dependency: "direct main"
182182
description:
@@ -218,7 +218,7 @@ packages:
218218
name: shared_preferences_windows
219219
url: "https://pub.dartlang.org"
220220
source: hosted
221-
version: "0.0.1+3"
221+
version: "0.0.2+3"
222222
sky_engine:
223223
dependency: transitive
224224
description: flutter
@@ -237,14 +237,14 @@ packages:
237237
name: sqflite
238238
url: "https://pub.dartlang.org"
239239
source: hosted
240-
version: "1.3.2+1"
240+
version: "1.3.2+3"
241241
sqflite_common:
242242
dependency: transitive
243243
description:
244244
name: sqflite_common
245245
url: "https://pub.dartlang.org"
246246
source: hosted
247-
version: "1.0.2+1"
247+
version: "1.0.3+1"
248248
stack_trace:
249249
dependency: transitive
250250
description:
@@ -307,7 +307,7 @@ packages:
307307
name: win32
308308
url: "https://pub.dartlang.org"
309309
source: hosted
310-
version: "1.7.4"
310+
version: "1.7.4+1"
311311
xdg_directories:
312312
dependency: transitive
313313
description:

pubspec.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
#
2+
# Copyright (c) 2021 tokku5552
3+
#
4+
# This software is released under the MIT License.
5+
# https://opensource.org/licenses/mit-license.php
6+
#
7+
#
18
name: todo_app_sample_flutter
29
description: A new Flutter application.
310

@@ -21,7 +28,7 @@ dependencies:
2128
dev_dependencies:
2229
flutter_test:
2330
sdk: flutter
24-
pedantic_mono: any
31+
pedantic: ^1.9.2
2532

2633
flutter:
2734
uses-material-design: true

test/todo_item_detail_model_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ void main() {
6666
);
6767
// repository.create(
6868
// '変更前', '変更前', false, DateTime.now().subtract(Duration(days: 1)));
69-
repository.create(
69+
await repository.create(
7070
title: '変更前',
7171
body: '変更前',
7272
isDone: false,

test/todo_item_test.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import 'package:flutter_test/flutter_test.dart';
99
import 'package:todo_app_sample_flutter/domain/todo_item.dart';
1010

1111
void main() {
12-
group("TodoItemのゲッターのテスト", () {
13-
final TodoItem todoItem = TodoItem(
12+
group('TodoItemのゲッターのテスト', () {
13+
final todoItem = TodoItem(
1414
id: 0,
1515
title: 'title',
1616
body: 'body',
@@ -24,11 +24,11 @@ void main() {
2424
});
2525

2626
test('titleのテスト', () async {
27-
expect(todoItem.getTitle, "title");
27+
expect(todoItem.getTitle, 'title');
2828
});
2929

3030
test('bodyのテスト', () async {
31-
expect(todoItem.getBody, "body");
31+
expect(todoItem.getBody, 'body');
3232
});
3333

3434
test('createdAtのテスト', () async {
@@ -44,8 +44,8 @@ void main() {
4444
});
4545
});
4646

47-
group("toMapのテスト", () {
48-
final TodoItem todoItem = TodoItem(
47+
group('toMapのテスト', () {
48+
final todoItem = TodoItem(
4949
id: 0,
5050
title: 'title',
5151
body: 'body',
@@ -77,7 +77,7 @@ void main() {
7777
});
7878
});
7979

80-
group("fromMapのテスト", () {
80+
group('fromMapのテスト', () {
8181
final json = {
8282
'id': 0,
8383
'title': 'title',
@@ -107,8 +107,8 @@ void main() {
107107
});
108108
});
109109

110-
group("toStringのテスト", () {
111-
final TodoItem todoItem = TodoItem(
110+
group('toStringのテスト', () {
111+
final todoItem = TodoItem(
112112
id: 0,
113113
title: 'title',
114114
body: 'body',

test/todo_list_model_test.dart

Lines changed: 21 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,12 @@ void main() {
5252
todoItemRepository.clear();
5353

5454
for (final todoItem in data) {
55-
todoItemRepository
56-
..incrementId()
57-
..create(
58-
title: todoItem.title,
59-
body: todoItem.body,
60-
isDone: todoItem.isDone,
61-
now: now);
55+
todoItemRepository.incrementId();
56+
await todoItemRepository.create(
57+
title: todoItem.title,
58+
body: todoItem.body,
59+
isDone: todoItem.isDone,
60+
now: now);
6261
}
6362

6463
model.viewCompletedItems = true;
@@ -89,13 +88,12 @@ void main() {
8988
// 事前準備
9089
todoItemRepository.clear();
9190
for (final todoItem in data) {
92-
todoItemRepository
93-
..incrementId()
94-
..create(
95-
title: todoItem.title,
96-
body: todoItem.body,
97-
isDone: todoItem.isDone,
98-
now: now);
91+
todoItemRepository.incrementId();
92+
await todoItemRepository.create(
93+
title: todoItem.title,
94+
body: todoItem.body,
95+
isDone: todoItem.isDone,
96+
now: now);
9997
}
10098

10199
// メソッド実行
@@ -112,13 +110,12 @@ void main() {
112110
// 事前準備
113111
todoItemRepository.clear();
114112
for (final todoItem in data) {
115-
todoItemRepository
116-
..incrementId()
117-
..create(
118-
title: todoItem.title,
119-
body: todoItem.body,
120-
isDone: todoItem.isDone,
121-
now: now);
113+
todoItemRepository.incrementId();
114+
await todoItemRepository.create(
115+
title: todoItem.title,
116+
body: todoItem.body,
117+
isDone: todoItem.isDone,
118+
now: now);
122119
}
123120

124121
// メソッド実行
@@ -165,10 +162,9 @@ void main() {
165162

166163
test('正常系:keyがある時', () async {
167164
// 事前準備
168-
storageRepository
169-
..clear()
170-
..savePersistenceStorage(
171-
viewCompletedItemsKey, viewCompletedItemsTrueString);
165+
storageRepository.clear();
166+
await storageRepository.savePersistenceStorage(
167+
viewCompletedItemsKey, viewCompletedItemsTrueString);
172168

173169
// メソッド実行
174170
await model.loadViewCompletedItems();

test/widget_test.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
// gestures. You can also use WidgetTester to find child widgets in the widget
66
// tree, read text, and verify that the values of widget properties are correct.
77

8-
import 'package:flutter/material.dart';
98
import 'package:flutter_test/flutter_test.dart';
10-
import 'package:todo_app_sample_flutter/presentation/main.dart';
119

1210
void main() {
1311
testWidgets('Counter increments smoke test', (WidgetTester tester) async {

0 commit comments

Comments
 (0)