Skip to content

Fix issues

Fix issues #65

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
paths-ignore:
- '**/README.md'
pull_request:
branches: [ main ]
jobs:
test-app:
name: App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Flutter version
run: flutter --version
- name: Cache pub dependencies
uses: actions/cache@v2
with:
path: ${{ env.FLUTTER_HOME }}/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
restore-keys: ${{ runner.os }}-pub-
- name: Download pub dependencies
run: flutter pub get
# - name: Pub Global
# run: dart pub global activate flutter_gen
# - name: Build runner
# run: flutter packages pub run build_runner build --delete-conflicting-outputs
# - name: Generate intl
# run: flutter pub run intl_utils:generate
# - name: Run fluttergen
# run: fluttergen -c pubspec.yaml
- name: Run analyzer
run: flutter analyze
# - name: Run Dart code metrics
# run: flutter pub run dart_code_metrics:metrics analyze lib
- name: Run tests
run: flutter test --coverage
- name: Install lcov
run: sudo apt-get install -y lcov
- name: Remove generated files from code coverage report
run: lcov --remove coverage/lcov.info 'lib/*/*.gen.dart' 'lib/generated/*.dart' 'lib/generated/*/*.dart' 'lib/di/*.dart' '**/lib/constants/' 'lib/constants/*.dart' -o coverage/lcov.info
- name: Remove router from code coverage report
run: lcov --remove coverage/lcov.info 'lib/routers/router.dart' -o coverage/lcov.info
- name: Check Code Coverage
uses: VeryGoodOpenSource/[email protected]
with:
path: coverage/lcov.info
min_coverage: 59
exclude: '**/*.g.dart **/*.gen.dart **/lib/di/ lib/generated/ **/lib/generated/ lib/di/*.dart **/lib/constants/ lib/constants/*.dart/ lib/routers/router.dart'
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3