Disable implicit casts, update and fix lints #209
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Dart CI | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'test_consume_*' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
# Can't run on `beta` (Dart 3) until we're fully null-safe. | |
sdk: [2.18.7, stable] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Print Dart SDK version | |
run: dart --version | |
- id: install | |
name: Install dependencies | |
run: dart pub get | |
- name: Validate dependencies | |
run: dart run dependency_validator | |
if: always() && steps.install.outcome == 'success' | |
- name: Verify formatting | |
run: dart format --output=none --line-length=120 --set-exit-if-changed . | |
if: ${{ matrix.sdk == '2.18.7' }} | |
- name: Analyze project source | |
run: dart analyze | |
if: always() && steps.install.outcome == 'success' | |
- name: Run tests (DDC) | |
run: | | |
if [ ${{ matrix.sdk }} = '2.13.4' ]; then dart run build_runner test -- --preset dartdevc-legacy; else dart run build_runner test -- --preset dartdevc; fi | |
if: always() && steps.install.outcome == 'success' | |
timeout-minutes: 5 | |
- name: Run tests (dart2js) | |
run: | | |
if [ ${{ matrix.sdk }} = '2.13.4' ]; then dart run build_runner test -- --preset dart2js-legacy; else dart run build_runner test -- --preset dart2js; fi | |
if: always() && steps.install.outcome == 'success' | |
timeout-minutes: 5 |