From 9896064756084c7d747cece73b81790b89f30aa4 Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Wed, 4 Jan 2023 21:30:13 +0700 Subject: [PATCH 1/2] [#137] Add CI steps to verify generated project by the script --- .github/workflows/test.yml | 20 ++++++++++++++++++++ .template/.github/workflows/test.yml | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6565e67b..56c63b49 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,3 +23,23 @@ jobs: - name: Set new project run: make run PACKAGE_NAME=co.nimblehq.flutter.template PROJECT_NAME=flutter_templates APP_NAME="Flutter Templates" + + - uses: subosito/flutter-action@v1 + with: + channel: 'stable' # 'dev', 'alpha', default to: 'stable' + flutter-version: '3.3.10' + + - name: Get flutter dependencies. + run: flutter pub get + + - name: Run code generator + run: flutter packages pub run build_runner build --delete-conflicting-outputs + + - name: Check for any formatting issues in the code. + run: flutter format --set-exit-if-changed . + + - name: Statically analyze the Dart code for any errors. + run: flutter analyze . + + - name: Run widget tests, unit tests. + run: flutter test --machine --coverage diff --git a/.template/.github/workflows/test.yml b/.template/.github/workflows/test.yml index 9d4da733..05abca60 100644 --- a/.template/.github/workflows/test.yml +++ b/.template/.github/workflows/test.yml @@ -20,7 +20,7 @@ jobs: - uses: subosito/flutter-action@v1 with: channel: 'stable' # 'dev', 'alpha', default to: 'stable' - flutter-version: '2.10.3' + flutter-version: '3.3.10' - name: Get flutter dependencies. run: flutter pub get From cae40dbdcfde789ecee618c2689dbf1e3f2a56a3 Mon Sep 17 00:00:00 2001 From: "Luong Vo (Lucas)" Date: Wed, 4 Jan 2023 23:21:49 +0700 Subject: [PATCH 2/2] [#137] Add analysis-options exclusion config --- .template/analysis_options.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.template/analysis_options.yaml b/.template/analysis_options.yaml index 61b6c4de..e8856d81 100644 --- a/.template/analysis_options.yaml +++ b/.template/analysis_options.yaml @@ -27,3 +27,10 @@ linter: # Additional information about this file can be found at # https://dart.dev/guides/language/analysis-options + +analyzer: + exclude: [ + lib/**.g.dart, + lib/**.freezed.dart, + test/**.mocks.dart + ]