blob: e42e8928302834669aa6cdf8d0000d1e1a739a23 [file] [log] [blame]
name: Dart
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:
# These are the latest versions of the github actions; dependabot will
# send PRs to keep these up-to-date.
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d
with:
sdk: ${{ matrix.sdk }}
- run: dart pub get
id: install
- run: dart format --output=none --set-exit-if-changed .
if: matrix.sdk == 'dev' && steps.install.outcome == 'success'
- run: dart analyze --fatal-infos
if: matrix.sdk == 'dev' && steps.install.outcome == 'success'
- run: dart test
if: matrix.sdk != 'dev' && steps.install.outcome == 'success'
- run: dart pub global activate coverage
if: matrix.sdk == 'dev' && steps.install.outcome == 'success'
id: install_pkg_coverage
- run: dart pub global run coverage:test_with_coverage
if: matrix.sdk == 'dev' && steps.install_pkg_coverage.outcome == 'success'
id: test_with_coverage
- uses: coverallsapp/github-action@master
if: matrix.sdk == 'dev' && steps.test_with_coverage.outcome == 'success'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}