CI: added static analysis, restored test step
This commit is contained in:
parent
4cbfcdc2e3
commit
c7670b9ccf
3 changed files with 22 additions and 8 deletions
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
|
@ -33,9 +33,11 @@ jobs:
|
|||
working-directory: ${{ github.workspace }}/scripts
|
||||
run: ./update_flutter_version.sh
|
||||
|
||||
# `flutter test` fails if test directory is missing
|
||||
#- name: Run the unit tests.
|
||||
# run: flutter test
|
||||
- name: Static analysis.
|
||||
run: flutter analyze
|
||||
|
||||
- name: Unit tests.
|
||||
run: flutter test
|
||||
|
||||
- name: Build signed artifacts.
|
||||
# `KEY_JKS` should contain the result of:
|
||||
|
|
|
@ -10,20 +10,24 @@ analyzer:
|
|||
|
||||
linter:
|
||||
rules:
|
||||
# from 'effective dart', excluded
|
||||
avoid_function_literals_in_foreach_calls: false # benefit?
|
||||
lines_longer_than_80_chars: false # nope
|
||||
avoid_classes_with_only_static_members: false # too strict
|
||||
|
||||
avoid_classes_with_only_static_members: false # maybe?
|
||||
# from 'effective dart', undecided
|
||||
prefer_relative_imports: false # check IDE support (auto import, file move)
|
||||
public_member_api_docs: false # maybe?
|
||||
|
||||
always_declare_return_types: true
|
||||
# from 'effective dart', included
|
||||
avoid_types_on_closure_parameters: true
|
||||
constant_identifier_names: true
|
||||
prefer_const_constructors: true
|
||||
prefer_const_constructors_in_immutables: true
|
||||
prefer_const_declarations: true
|
||||
prefer_function_declarations_over_variables: true
|
||||
prefer_interpolation_to_compose_strings: true
|
||||
unnecessary_brace_in_string_interps: true
|
||||
unnecessary_lambdas: true
|
||||
|
||||
# misc
|
||||
prefer_const_constructors: false # too noisy
|
||||
prefer_const_constructors_in_immutables: true
|
||||
prefer_const_declarations: true
|
||||
|
|
8
test/widget_test.dart
Normal file
8
test/widget_test.dart
Normal file
|
@ -0,0 +1,8 @@
|
|||
import 'package:aves/main.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
void main() {
|
||||
testWidgets('TODO TLAD', (tester) async {
|
||||
await tester.pumpWidget(AvesApp());
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue