Skip to content

Dart

Dart #376

Workflow file for this run

name: Dart
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
- name: Install dependencies
run: dart pub get
- name: Verify formatting
run: dart format --line-length 120 --output none --set-exit-if-changed .
- name: Analyze project source
run: dart analyze --fatal-infos lib/
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: subosito/flutter-action@v1
- name: Install dependencies
run: flutter pub get
- name: Run tests and generate coverage
# Cheat and user flutter instead of dart for coverage test,
# as it can generate lcov files directly
run: flutter test --coverage
- name: Upload coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: coverage/lcov.info
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
sdk: [stable, beta, dev]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Install dependencies
run: dart pub get
- name: Run tests
run: dart test