feat: flutter map v8 #161
Workflow file for this run
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: 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: | |
cache: true | |
- name: Get dependencies | |
run: flutter pub get | |
- 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: | |
cache: true | |
- name: Install coverde | |
run: dart pub global activate coverde | |
- name: Get Dependencies | |
run: flutter pub get | |
- name: Run Test with Coverage | |
run: | | |
rm -rf coverage | |
cd flutter_map_cache | |
flutter test --no-pub -r expanded --coverage | |
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
cd .. | |
cd flutter_map_compass | |
flutter test --no-pub -r expanded --coverage | |
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
cd .. | |
# cd flutter_map_maplibre | |
# flutter test --no-pub -r expanded --coverage | |
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
# cd .. | |
cd flutter_map_mbtiles | |
flutter test --no-pub -r expanded --coverage | |
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
cd .. | |
cd flutter_map_pmtiles | |
flutter test --no-pub -r expanded --coverage | |
coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
cd .. | |
# cd vector_map_tiles_mbtiles | |
# flutter test --no-pub -r expanded --coverage | |
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
# cd .. | |
# cd vector_map_tiles_pmtiles | |
# flutter test --no-pub -r expanded --coverage | |
# coverde filter --input ./coverage/lcov.info --output ../coverage/filtered.lcov.info --filters \.g\.dart | |
# cd .. | |
coverde value -i coverage/filtered.lcov.info > coverage/result.txt | |
- name: Run Codecov | |
uses: codecov/codecov-action@v5 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
package-score: | |
name: "Package score" | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: Get Dependencies | |
run: flutter pub get | |
- name: Install pana | |
run: dart pub global activate pana | |
- name: Check package score for all | |
run: | | |
cd flutter_map_cache | |
pana --exit-code-threshold 0 --no-dartdoc . | |
cd .. | |
cd flutter_map_compass | |
pana --exit-code-threshold 0 --no-dartdoc . | |
cd .. | |
cd flutter_map_maplibre | |
pana --exit-code-threshold 0 --no-dartdoc . | |
cd .. | |
cd flutter_map_mbtiles | |
pana --exit-code-threshold 0 --no-dartdoc . | |
cd .. | |
cd flutter_map_pmtiles | |
pana --exit-code-threshold 0 --no-dartdoc . | |
cd .. | |
# cd vector_map_tiles_mbtiles | |
# pana --exit-code-threshold 0 --no-dartdoc . | |
# cd .. | |
# cd vector_map_tiles_pmtiles | |
# pana --exit-code-threshold 0 --no-dartdoc . | |
# cd .. | |
build-android: | |
runs-on: ubuntu-latest | |
name: Build Android | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'zulu' | |
java-version: '17' | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: Build APK | |
working-directory: example | |
run: flutter build apk | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: apk | |
path: example/build/app/outputs/flutter-apk/app-release.apk | |
- name: Upload apk as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: flutter_map_plugins_example.apk | |
path: example/build/app/outputs/flutter-apk/app-release.apk | |
# build-ios: | |
# runs-on: macos-latest | |
# name: Build iOS | |
# defaults: | |
# run: | |
# working-directory: ./example | |
# steps: | |
# - uses: actions/checkout@v4 | |
# - uses: subosito/flutter-action@v2 | |
# with: | |
# flutter-version: ${{ matrix.sdk }} | |
# cache: true | |
# - uses: maxim-lobanov/setup-cocoapods@v1 | |
# with: | |
# podfile-path: example/ios/Podfile.lock | |
# - run: flutter pub get | |
# - name: Build iOS package | |
# run: flutter build ios --simulator | |
# - name: Upload Runner.app as artifact | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: flutter_map_plugins_example.app | |
# path: example/build/ios/iphonesimulator | |
build-web: | |
runs-on: ubuntu-latest | |
name: Build Web | |
defaults: | |
run: | |
working-directory: ./example | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Setup Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
cache: true | |
- name: Build Web | |
run: flutter build web | |
- name: Upload web as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: flutter_map_plugins_example.web | |
path: example/build/web |