| name: package:messages | |
| permissions: read-all | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/messages.yml' | |
| - 'pkgs/messages/**' | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - '.github/workflows/messages.yml' | |
| - 'pkgs/messages/**' | |
| schedule: | |
| - cron: '0 0 * * 0' # weekly | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: pkgs/messages | |
| steps: | |
| - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 | |
| - uses: flutter-actions/setup-flutter@18c66a64fb6f6d3338c63cabbc5cd6da395e7f1d | |
| with: | |
| channel: beta | |
| - run: dart pub get | |
| - run: dart pub get | |
| working-directory: pkgs/messages/example | |
| - run: flutter pub get | |
| working-directory: pkgs/messages/examples_flutter/my_application | |
| - run: flutter pub get | |
| working-directory: pkgs/messages/examples_flutter/my_shopping_cart | |
| - run: dart analyze --fatal-infos | |
| - run: dart format --output=none --set-exit-if-changed . | |
| - run: dart test | |
| - name: Regenerate and run example | |
| working-directory: pkgs/messages/example | |
| run: | | |
| dart run messages || exit 1 | |
| git diff --exit-code || exit 1 | |
| dart run || exit 1 |