| name: validate |
| |
| # Controls when the action will run. |
| on: |
| # Triggers the workflow on push or pull request events but only for the main branch |
| push: |
| branches: [ main ] |
| pull_request: |
| branches: [ main ] |
| # Run weekly |
| schedule: |
| - cron: "0 0 * * 0" |
| |
| jobs: |
| build: |
| runs-on: ubuntu-latest |
| strategy: |
| fail-fast: false |
| matrix: |
| sdk: [3.1, stable, beta] |
| |
| steps: |
| - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b |
| - uses: dart-lang/setup-dart@f0ead981b4d9a35b37f30d36160575d60931ec30 |
| with: |
| sdk: ${{ matrix.sdk }} |
| |
| - run: dart pub get |
| - run: dart format --output=none --set-exit-if-changed . |
| - run: dart analyze --fatal-infos |
| - run: dart tool/validate_lib.dart |
| - run: dart tool/gen_docs.dart --verify |