v1.0.0 #16
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
name: Flutter CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
container: | |
image: ghcr.io/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: flutter pub global run dart_code_metrics: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: ghcr.io/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: ghcr.io/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 |