feat: update to dart 3.6 #2140
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: very_good_cli | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/very_good_cli.yaml" | |
- "lib/**" | |
- "test/**" | |
- "pubspec.yaml" | |
push: | |
branches: | |
- main | |
paths: | |
- ".github/workflows/very_good_cli.yaml" | |
- "lib/**" | |
- "test/**" | |
- "pubspec.yaml" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/[email protected] | |
with: | |
flutter-version: 3.27.0 | |
- name: Install Dependencies | |
run: flutter pub get | |
- name: Format | |
run: dart format --set-exit-if-changed lib test | |
- name: Analyze | |
run: flutter analyze lib test | |
- name: Verify Build | |
run: flutter pub run test --run-skipped -t pull-request-only | |
- name: Run Tests | |
run: | | |
flutter pub global activate coverage 1.2.0 | |
flutter pub run test -j 1 -x pull-request-only -x e2e --coverage=coverage --test-randomize-ordering-seed random && dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on=lib | |
- name: Check Code Coverage | |
uses: VeryGoodOpenSource/[email protected] | |
with: | |
exclude: "**/*.gen.dart" | |
pana: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: subosito/[email protected] | |
- name: Install Dependencies | |
run: | | |
flutter packages get | |
flutter pub global activate pana | |
- name: Verify Pub Score | |
run: | | |
PANA=$(pana . --no-warning); PANA_SCORE=$(echo $PANA | sed -n "s/.*Points: \([0-9]*\)\/\([0-9]*\)./\1\/\2/p") | |
echo "score: $PANA_SCORE" | |
IFS='/'; read -a SCORE_ARR <<< "$PANA_SCORE"; SCORE=SCORE_ARR[0]; TOTAL=SCORE_ARR[1] | |
if (( $SCORE < $TOTAL )); then echo "minimum score not met!"; exit 1; fi |