chore(deps): bump VeryGoodOpenSource/very_good_coverage from 2 to 3 (… #188
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: build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
semantic-pull-request: | |
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/semantic_pull_request.yml@v1 | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dart-version: | |
- "3.0.0" # The minimum Dart SDK version supported by the package. | |
- "stable" | |
steps: | |
# Consider replacing this with Very Good Workflows' dart_package, once the following | |
# issue is resolved: | |
# https://github.com/VeryGoodOpenSource/very_good_workflows/issues/151 | |
- name: 📚 Git Checkout | |
uses: actions/checkout@v4 | |
- name: 🎯 Setup Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.dart-version }} | |
- name: 📦 Install Dependencies | |
run: dart pub get --no-example | |
- name: ✨ Check Formatting | |
run: dart format --set-exit-if-changed lib test | |
- name: 🕵️ Analyze | |
run: dart analyze --fatal-infos --fatal-warnings lib test | |
- name: 🧪 Run Tests | |
run: | | |
dart pub global activate coverage 1.2.0 | |
dart test -j 4 --coverage=coverage --platform="vm" && dart pub global run coverage:format_coverage --lcov --check-ignore --in=coverage --out=coverage/lcov.info --packages=.dart_tool/package_config.json --report-on="lib,test" | |
- name: 📊 Check Code Coverage | |
uses: VeryGoodOpenSource/very_good_coverage@v3 | |
spell-check: | |
uses: VeryGoodOpenSource/very_good_workflows/.github/workflows/[email protected] | |
with: | |
includes: | | |
**/*.{dart,md,yaml} | |
!.dart_tool/**/*.{dart,yaml} | |
.*/**/*.yml | |
modified_files_only: false | |
pana: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- uses: subosito/flutter-action@v2 | |
- 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 |