| name: Dart CI |
| |
| on: |
| push: |
| branches: [master] |
| pull_request: |
| branches: [master] |
| schedule: |
| - cron: "0 0 * * 0" |
| |
| jobs: |
| analyze: |
| runs-on: ubuntu-latest |
| strategy: |
| fail-fast: false |
| steps: |
| - uses: actions/checkout@v2 |
| - uses: dart-lang/setup-dart@v0.3 |
| with: |
| sdk: dev |
| - id: install |
| name: Install dependencies |
| run: dart pub get |
| - name: Check formatting |
| run: dart format --output=none --set-exit-if-changed . |
| if: steps.install.outcome == 'success' |
| - name: Analyze code |
| run: dart analyze --fatal-infos |
| if: steps.install.outcome == 'success' |
| |
| test: |
| needs: analyze |
| runs-on: ${{ matrix.os }} |
| strategy: |
| fail-fast: false |
| matrix: |
| os: [ubuntu-latest] |
| sdk: [dev] |
| steps: |
| - uses: actions/checkout@v2 |
| - uses: dart-lang/setup-dart@v0.3 |
| with: |
| sdk: ${{ matrix.sdk }} |
| - id: install |
| name: Install dependencies |
| run: pub get |
| - name: Run VM tests |
| run: pub run test --platform vm |
| if: steps.install.outcome == 'success' |
| - name: Run Chrome tests |
| run: pub run test --platform chrome |
| if: steps.install.outcome == 'success' |