blob: 34a3a8000ec1e3172b908dda05de1fab3fae6056 [file] [log] [blame]
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.12.0, dev]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1.0
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'