| name: ci |
| |
| on: |
| push: |
| branches: [ master ] |
| pull_request: |
| branches: [ master ] |
| schedule: |
| - cron: "0 0 * * 0" |
| |
| jobs: |
| test: |
| runs-on: ubuntu-latest |
| strategy: |
| fail-fast: false |
| matrix: |
| sdk: [2.14.0, dev] |
| |
| steps: |
| - uses: actions/checkout@v2.3.4 |
| - uses: dart-lang/setup-dart@v1.2 |
| with: |
| sdk: ${{ matrix.sdk }} |
| - run: dart pub get |
| id: install |
| - run: dart format --output=none --set-exit-if-changed . |
| if: always() && steps.install.outcome == 'success' |
| - run: dart analyze --fatal-infos |
| if: always() && steps.install.outcome == 'success' |
| - run: dart test |
| if: matrix.sdk != 'dev' && steps.install.outcome == 'success' |
| |
| - run: dart test --coverage coverage |
| if: matrix.sdk == 'dev' && steps.install.outcome == 'success' |
| - run: pub global activate coverage |
| if: matrix.sdk == 'dev' |
| - run: pub global run coverage:format_coverage --packages=.packages -i coverage --report-on=lib --lcov > coverage/lcov.info |
| if: matrix.sdk == 'dev' |
| - uses: coverallsapp/github-action@master |
| with: |
| github-token: ${{ secrets.GITHUB_TOKEN }} |
| if: matrix.sdk == 'dev' |