-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d59f468
commit 31918c3
Showing
5 changed files
with
148 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
name: Flutter CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cirruslabs/flutter:stable | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Flutter pub get | ||
run: flutter pub get | ||
|
||
- name: Activate dart_code_metrics | ||
run: flutter pub global activate dart_code_metrics | ||
|
||
- name: Run code metrics | ||
run: metrics lib -r codeclimate > gh-code-quality-report.json | ||
|
||
- name: Upload code quality report | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: code-quality-report | ||
path: gh-code-quality-report.json | ||
|
||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cirruslabs/flutter:stable | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Flutter pub get | ||
run: flutter pub get | ||
|
||
- name: Run Dart analyze | ||
run: dart analyze --fatal-infos | ||
|
||
format: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
container: | ||
image: cirruslabs/flutter:stable | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Flutter pub get | ||
run: flutter pub get | ||
|
||
- name: Run Dart format | ||
run: dart format . -o none --set-exit-if-changed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include: package:flutter_lints/flutter.yaml | ||
|
||
analyzer: | ||
exclude: | ||
# workaround for https://github.com/dart-lang/sdk/issues/42910 | ||
- 'example/**' | ||
|
||
linter: | ||
# https://dart-lang.github.io/linter/lints/index.html. | ||
rules: | ||
prefer_single_quotes: true | ||
require_trailing_commas: true | ||
prefer_final_locals: true | ||
prefer_final_in_for_each: true | ||
use_build_context_synchronously: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,3 +11,6 @@ dependencies: | |
flutter: | ||
sdk: flutter | ||
vector_math: ^2.1.2 | ||
|
||
dev_dependencies: | ||
flutter_lints: ^3.0.1 |