[#494] [BF] Markdown alignments. Fix initialization #475
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 | |
with: | |
fetch-depth: 0 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'stable' | |
cache: true | |
- run: sudo apt-get install -y lcov | |
- 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 | |
genhtml coverage/lcov.info -o coverage/unit | |
cp -R ./coverage/lcov.info ./coverage/unit | |
- name: Run Widget Tests | |
run: | | |
dart run grinder full-coverage --path="" --type=widget | |
dart run grinder test --coverage --path=test/widget | |
genhtml coverage/lcov.info -o coverage/widget | |
cp -R ./coverage/lcov.info ./coverage/widget | |
- name: Run End-To-End Tests | |
run: | | |
dart run grinder full-coverage --path="" --type=e2e | |
dart run grinder test --coverage --path=test/e2e | |
genhtml coverage/lcov.info -o coverage/e2e | |
cp -R ./coverage/lcov.info ./coverage/e2e | |
- name: Get Full Coverage | |
run: | | |
flutter test --coverage | |
dart run test_cov_console --file="./coverage/lcov.info" --total | tr -d '[:space:]' > ./coverage/test_total.log | |
- name: Create Dependency Graph | |
run: | | |
sudo apt-get install -y graphviz | |
dart run grinder create-class-graph | |
- name: Build Web Package | |
run: | | |
BUILD=$(git rev-list --count HEAD) | |
TAG=$(git describe --tags `git rev-list --tags --max-count=1` | cut -c 2-) | |
dart run grinder pubspec-update --build-name=$TAG --build-number=$BUILD | |
flutter build -v web --profile --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 |