flutter_news_example #1600
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_news_example | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
schedule: | |
- cron: "0 0 * * *" | |
pull_request: | |
paths: | |
- "flutter_news_example/api/**" | |
- "flutter_news_example/lib/**" | |
- "flutter_news_example/test/**" | |
- "flutter_news_example/packages/**" | |
- "flutter_news_example/pubspec.yaml" | |
- ".github/workflows/flutter_news_example.yaml" | |
branches: | |
- main | |
jobs: | |
build: | |
defaults: | |
run: | |
working-directory: flutter_news_example | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
channel: [stable] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/[email protected] | |
with: | |
channel: ${{matrix.channel}} | |
flutter-version: "3.24.2" | |
cache: false | |
- name: Install Dependencies | |
run: | | |
flutter pub global activate very_good_cli | |
very_good packages get --recursive | |
- name: Format | |
run: dart format --set-exit-if-changed lib test | |
- name: Analyze | |
run: flutter analyze lib test | |
- name: Verify Generated Files Committed | |
run: flutter test ./test/ensure_build_test.dart --run-skipped | |
- name: Run tests | |
run: very_good test -x presubmit-only --coverage --test-randomize-ordering-seed random | |
- name: Check Code Coverage | |
uses: VeryGoodOpenSource/very_good_coverage@v3 | |
with: | |
exclude: "**/*.g.dart **/*.gen.dart **/l10n/*.dart **/l10n/**/*.dart **/main/bootstrap.dart" | |
path: flutter_news_example/coverage/lcov.info | |
- name: Generate Visual Architecture | |
env: | |
FLUTTER_DART_HOME: ${{ env.FLUTTER_HOME }}/bin/cache/dart-sdk/bin | |
FLUTTER_PUB_CACHE: ${{ env.FLUTTER_HOME }}/.pub-cache/bin | |
run: | | |
flutter pub global activate pubviz | |
export PATH=$PATH:$FLUTTER_DART_HOME | |
export PATH=$PATH:$FLUTTER_PUB_CACHE | |
pubviz print -d > pubviz.html | |
- name: Upload Visual Architecture Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: visual-architecture-report | |
path: ./flutter_news_example/pubviz.html |