Merge pull request #172 from lyskouski/RF-146 #68
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/Dart Quality Gates | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- run: flutter --version | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Verify Formatting | |
run: dart format -l 120 --output=none --set-exit-if-changed . | |
- name: Check Localizations ordering | |
run: dart run grinder sort-translations | |
# Consider passing '--fatal-infos' for slightly stricter analysis. | |
#- name: Analyze Project Source | |
# run: flutter analyze | |
- name: Run Unit Tests (with coverage) | |
run: | | |
dart run grinder full-coverage --path="/_classes" --type=unit | |
dart run grinder test --coverage --path=test/unit | |
- name: Run Widget Tests | |
run: | | |
dart run grinder full-coverage --path="" --type=widget | |
dart run grinder test --coverage --path=test/widget | |
- name: Run End-To-End Tests | |
run: | | |
dart run grinder full-coverage --path="" --type=e2e | |
dart run grinder test --coverage --path=test/e2e | |
- name: Build Web Package | |
run: flutter build -v web --release --no-tree-shake-icons --base-href="/app-finance/" | |
- name: Add Coverage Report to the Package | |
run: cp -R ./coverage ./build/web/coverage | |
- name: Update GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/web |