Skip to content

Upgraded pub packages for Flutter v3.13.6 #591

Upgraded pub packages for Flutter v3.13.6

Upgraded pub packages for Flutter v3.13.6 #591

Workflow file for this run

name: Dart-CI-Pipeline
on:
push:
branches: [ '**' ]
pull_request:
branches: [ '**' ]
env:
flutter_version: 3.13.6
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Cache Flutter dependencies
uses: actions/cache@v3
with:
path: /opt/hostedtoolcache/flutter
key: ${{ runner.OS }}-flutter-install-cache-${{ env.flutter_version }}
restore-keys: ${{ runner.OS }}-flutter-install-cache
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.flutter_version }}
- run: flutter --version
- run: flutter clean
- name: Install Dependencies
run: flutter pub get
- run: flutter pub outdated
- name: Analyze
run: dart analyze --fatal-infos
- name: Format
run: dart format --output=none --set-exit-if-changed .
- name: Create helper file for coverage results
run: |
file=test/coverage_helper_test.dart
echo "// Helper file to make coverage work for all dart files\n" > $file
echo "// ignore_for_file: unused_import, directives_ordering" >> $file
find lib ! -name '*_web.dart' -name '*dart' | \
cut -c4- | \
awk -v package=$1 '{printf "import '\''package:flutter_code_editor%s%s'\'';\n", package, $1}' >> $file
echo "void main(){}" >> $file
echo "\n"
cat $file
echo "\n"
- name: Test
run: flutter test --coverage
# As we don't use file generation, it is fine to include everything.
# - name: Install lcov
# run: sudo apt-get install -y lcov
#
# - name: Remove generated files from coverage results
# run: |
# lcov --remove coverage/lcov.info \
# 'lib/*/*freezed.dart' \
# 'lib/*/*.g.dart' \
# 'lib/*/*.part.dart' \
# 'lib/generated/*.dart' \
# 'lib/generated/*/*.dart' -o coverage/lcov.info
- name: Codecov
uses: codecov/codecov-action@v3
with:
file: coverage/lcov.info