Skip to content

chore: fix fatal ci #37

chore: fix fatal ci

chore: fix fatal ci #37

Workflow file for this run

name: Test & Build
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
analyze:
runs-on: ubuntu-latest
name: Analyze
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Get dependencies
run: melos run pub_get --no-select
- name: Analyze all projects
run: dart analyze --fatal-infos --fatal-warnings
- name: Format all projects
run: dart format --output=none --set-exit-if-changed .
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Install melos
run: dart pub global activate melos
- name: Bootstrap melos
run: melos bootstrap
- name: Install coverde
run: dart pub global activate coverde
- name: Run tests with coverage
run: melos run test_with_coverage --no-select
- name: Run Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
package-score:
name: "Package score"
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Dart Package Analyser
uses: axel-op/dart-package-analyzer@v3
id: analysis
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
- name: Check package score
env:
TOTAL: ${{ steps.analysis.outputs.total }}
TOTAL_MAX: ${{ steps.analysis.outputs.total_max }}
run: |
if (( $TOTAL < $TOTAL_MAX ))
then
echo Package score needs to get improved: $TOTAL / $TOTAL_MAX
exit 1
fi
build-android:
runs-on: ubuntu-latest
name: Build Android
steps:
- name: Checkout project
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '21'
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build APK
working-directory: example
run: flutter build apk
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: apk
path: example/build/app/outputs/flutter-apk/app-release.apk
build-web:
runs-on: ubuntu-latest
name: Build Web
if: github.repository == 'josxha/flutter_map_plugins'
defaults:
run:
working-directory: ./example
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: "stable"
- name: Build Web
run: flutter build web