Skip to content

feat!: upgrade to dart 3 + better usage of FutureOr capabilities #26

feat!: upgrade to dart 3 + better usage of FutureOr capabilities

feat!: upgrade to dart 3 + better usage of FutureOr capabilities #26

name: Ensure code quality
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dart
uses: dart-lang/[email protected]
- name: Install dependencies
run: dart pub global activate pana
- name: Pub get
run: dart pub get
- name: Verify formatting
run: dart format --set-exit-if-changed .
- name: Analyze source code
run: dart analyze --fatal-infos --fatal-warnings
- name: Verify Pub Score
run: bin/ensure_pana_score.sh
- name: Verify ready for publish
run: dart pub publish --dry-run
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install flutter
uses: subosito/[email protected]
- name: Install dependencies
run: |
dart pub get
dart pub global activate coverage
- name: Run dart tests
shell: bash
run: dart test --coverage=coverage && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --report-on=lib
- name: Upload coverage to Codecov
uses: codecov/[email protected]
- name: Check code coverage
uses: VeryGoodOpenSource/[email protected]
with:
min_coverage: 90
path: coverage/lcov.info