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 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 + ]