Skip to content

Commit fcf2c34

Browse files
authored
feat: update very good analysis, flutter version and workflows (#44)
* feat: update very good analysis, flutter version and workflows * add more workflows * cspell * get som tests from jaimes pr
1 parent 4d13dbb commit fcf2c34

File tree

15 files changed

+181
-66
lines changed

15 files changed

+181
-66
lines changed

.github/cspell.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"version": "0.2",
3+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
4+
"dictionaries": [
5+
"vgv_allowed",
6+
"vgv_forbidden"
7+
],
8+
"dictionaryDefinitions": [
9+
{
10+
"name": "vgv_allowed",
11+
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/allowed.txt",
12+
"description": "Allowed VGV Spellings"
13+
},
14+
{
15+
"name": "vgv_forbidden",
16+
"path": "https://raw.githubusercontent.com/verygoodopensource/very_good_dictionaries/main/forbidden.txt",
17+
"description": "Forbidden VGV Spellings"
18+
}
19+
],
20+
"useGitignore": true,
21+
"words": [
22+
"Mockingjay",
23+
"korzonkiee",
24+
"Jignesh",
25+
"Fullscreen",
26+
"allisonryan"
27+
]
28+
}

.github/workflows/example.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: example
2+
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
14+
15+
jobs:
16+
semantic_pull_request:
17+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/[email protected]
18+
19+
build:
20+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/[email protected]
21+
with:
22+
flutter_channel: stable
23+
working_directory: example
24+
runs_on: macos-latest

.github/workflows/main.yaml

Lines changed: 28 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,34 @@
1-
name: mockingjay
1+
name: ci
22

3-
on: [pull_request]
3+
concurrency:
4+
group: ${{ github.workflow }}-${{ github.ref }}
5+
cancel-in-progress: true
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
414

515
jobs:
6-
semantic-pull-request:
16+
semantic_pull_request:
717
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1
818

919
build:
10-
runs-on: ubuntu-latest
11-
12-
steps:
13-
- uses: actions/checkout@v3
14-
15-
- uses: subosito/[email protected]
16-
17-
- name: Install Dependencies
18-
run: flutter packages get
19-
20-
- name: Format
21-
run: flutter format --set-exit-if-changed .
22-
23-
- name: Analyze
24-
run: flutter analyze lib test example
25-
26-
- name: Run tests
27-
run: flutter test --no-pub --coverage --test-randomize-ordering-seed random
28-
29-
- name: Run example project tests
30-
working-directory: example/
31-
run: flutter test --no-pub --test-randomize-ordering-seed random
32-
33-
- name: Check Code Coverage
34-
uses: VeryGoodOpenSource/[email protected]
35-
with:
36-
path: coverage/lcov.info
37-
38-
pana:
39-
runs-on: ubuntu-latest
40-
41-
steps:
42-
- uses: actions/checkout@v3
43-
44-
- uses: subosito/[email protected]
45-
46-
- name: Install Dependencies
47-
run: |
48-
flutter packages get
49-
flutter pub global activate pana
50-
51-
- name: Verify Pub Score
52-
run: ./tool/verify_pub_score.sh
20+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/flutter_package.yml@v1
21+
with:
22+
flutter_channel: stable
23+
24+
spell-check:
25+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/spell_check.yml@v1
26+
with:
27+
includes: |
28+
**/*.{md,yaml}
29+
!.dart_tool/**/*.yaml
30+
.*/**/*.yml
31+
modified_files_only: false
32+
33+
pana_score:
34+
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/pana.yml@v1

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include: package:very_good_analysis/analysis_options.3.1.0.yaml
1+
include: package:very_good_analysis/analysis_options.4.0.0.yaml

example/analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:very_good_analysis/analysis_options.3.1.0.yaml
1+
include: package:very_good_analysis/analysis_options.4.0.0.yaml
22
linter:
33
rules:
44
public_member_api_docs: false

example/lib/app.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import 'package:example/ui/ui.dart';
22
import 'package:flutter/material.dart';
33

44
class App extends StatelessWidget {
5-
const App({Key? key}) : super(key: key);
5+
const App({super.key});
66

77
@override
88
Widget build(BuildContext context) {

example/lib/ui/home_screen.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
33
import 'package:universal_io/io.dart';
44

55
class HomeScreen extends StatefulWidget {
6-
const HomeScreen({Key? key}) : super(key: key);
6+
const HomeScreen({super.key});
77

88
@override
99
State<HomeScreen> createState() => _HomeScreenState();
@@ -78,7 +78,7 @@ class _HomeScreenState extends State<HomeScreen> {
7878
children: [
7979
Text(
8080
'This is an example app showcasing the Mockingjay library.',
81-
style: theme.textTheme.headline6,
81+
style: theme.textTheme.titleLarge,
8282
),
8383
const SizedBox(height: 8),
8484
Text.rich(

example/lib/ui/pincode_screen.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import 'package:flutter/services.dart';
33
import 'package:universal_io/io.dart';
44

55
class PincodeScreen extends StatefulWidget {
6-
const PincodeScreen({Key? key}) : super(key: key);
6+
const PincodeScreen({super.key});
77

88
static Route<String?> route() {
99
return MaterialPageRoute(
@@ -39,9 +39,7 @@ class _PincodeScreenState extends State<PincodeScreen> {
3939
}
4040

4141
void _onSubmitted() {
42-
if (_pincode.length == 6) {
43-
Navigator.of(context).pop(_pincode);
44-
} else {
42+
if (_pincode.length != 6) {
4543
setState(() {
4644
_errorText = 'Pincode must be 6 digits long';
4745
});

example/lib/ui/quiz_dialog.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ enum QuizOption {
66
}
77

88
class QuizDialog extends StatelessWidget {
9-
const QuizDialog({Key? key}) : super(key: key);
9+
const QuizDialog({super.key});
1010

1111
static Future<QuizOption?> show(BuildContext context) {
1212
return showCupertinoDialog<QuizOption>(

example/pubspec.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ version: 0.0.1
44
homepage: https://github.com/VeryGoodOpenSource/mockingjay
55

66
environment:
7-
sdk: ">=2.12.0 <3.0.0"
8-
flutter: ">=1.17.0"
7+
sdk: ">=2.19.0 <3.0.0"
98

109
dependencies:
1110
bloc: ^8.0.0
@@ -22,7 +21,7 @@ dev_dependencies:
2221
mockingjay:
2322
path: ../
2423
mocktail: ^0.3.0
25-
very_good_analysis: ^3.1.0
24+
very_good_analysis: ^4.0.0
2625

2726
flutter:
2827
uses-material-design: true

0 commit comments

Comments
 (0)