chore(deps): bump actions/dependency-review-action from 4 to 5 #2105
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| workflow_dispatch: | |
| # Ensure that new pushes/updates cancel running jobs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| format-dart: | |
| name: "[Dart] Check formatting" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: { cache: true } | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Lint analysis | |
| run: dart format --set-exit-if-changed . | |
| lints-swift: | |
| name: "[Swift] Check formatting" | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Format Swift code" | |
| run: swiftformat --verbose --lint . --reporter github-actions-log --swiftversion 6 --disable trailingCommas | |
| lint-dart: | |
| name: "[Dart] Static code analysis" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: { cache: true } | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Lint analysis | |
| run: dart analyze --fatal-warnings --fatal-infos | |
| lint-kotlin: | |
| name: "[Kotlin] Code quality" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: ktlint | |
| uses: ScaCap/action-ktlint@v1 | |
| with: | |
| github_token: ${{ secrets.github_token }} | |
| reporter: github-pr-check | |
| filter_mode: nofilter | |
| file_glob: "!**/*.g.*" | |
| fail_on_error: true | |
| unit-test: | |
| name: "Unit tests" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| package: [ 'maplibre', 'maplibre_webview' ] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Setup Flutter SDK" | |
| uses: subosito/flutter-action@v2 | |
| with: { cache: true } | |
| - name: "Get Flutter dependencies" | |
| run: flutter pub get | |
| - name: "Run unit tests in package" | |
| working-directory: packages/${{ matrix.package }} | |
| run: flutter test --timeout=600s --coverage | |
| - name: "Run Codecov" | |
| uses: codecov/codecov-action@v6 | |
| if: ${{ matrix.sdk == '' }} | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # integration-test-ios: | |
| # name: "[iOS] Integration tests" | |
| # runs-on: macOS-latest | |
| # defaults: { run: { working-directory: examples } } | |
| # strategy: | |
| # fail-fast: false | |
| # matrix: | |
| # os_version: [ '18.6', '26.2' ] | |
| # timeout-minutes: 30 | |
| # steps: | |
| # - uses: actions/checkout@v6 | |
| # - uses: subosito/flutter-action@v2 | |
| # with: { cache: true } | |
| # - name: Install dependencies | |
| # run: flutter pub get | |
| # - name: Enable Swift Package Manager | |
| # run: flutter config --enable-swift-package-manager | |
| # - name: Start iOS simulator | |
| # uses: futureware-tech/simulator-action@v3 | |
| # with: | |
| # model: 'iPhone 16 Pro' | |
| # os_version: ${{ matrix.os_version }} | |
| # - name: Wait for simulator | |
| # run: xcrun simctl bootstatus booted -b | |
| # - name: Run integration tests | |
| # run: flutter test integration_test/main.dart --timeout=1800s -r expanded --coverage --coverage-package maplibre.* | |
| # - name: "Run Codecov" | |
| # uses: codecov/codecov-action@v6 | |
| # if: ${{ matrix.os_version == '26.2' }} | |
| # env: | |
| # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| integration-test-android: | |
| name: "[Android] Integration tests" | |
| runs-on: ubuntu-latest | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| api-level: [ 24, 35 ] | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: "Setup Flutter SDK" | |
| uses: subosito/flutter-action@v2 | |
| with: { cache: true } | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: "Get Flutter dependencies" | |
| run: flutter pub get | |
| # https://github.com/marketplace/actions/android-emulator-runner#running-hardware-accelerated-emulators-on-linux-runners | |
| - name: "Enable KVM group perms" | |
| run: | | |
| echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules | |
| sudo udevadm control --reload-rules | |
| sudo udevadm trigger --name-match=kvm | |
| - name: "Run integration tests" | |
| uses: reactivecircus/android-emulator-runner@v2 | |
| with: | |
| api-level: ${{ matrix.api-level }} | |
| arch: x86_64 | |
| emulator-boot-timeout: 1800 # 30 minutes | |
| script: cd examples && flutter test integration_test/main.dart --timeout=1800s -r expanded --coverage --coverage-package maplibre.* | |
| - name: "Run Codecov" | |
| uses: codecov/codecov-action@v6 | |
| if: ${{ matrix.api-level == '35' }} | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| # integration-test-web: | |
| # name: "[Web] Integration tests" | |
| # runs-on: ubuntu-latest | |
| # timeout-minutes: 30 | |
| # defaults: | |
| # run: | |
| # working-directory: examples | |
| # strategy: | |
| # fail-fast: false | |
| # matrix: | |
| # sdk: ['3.38.10', ''] | |
| # env: | |
| # CI: true | |
| # steps: | |
| # - name: "Checkout repository" | |
| # uses: actions/checkout@v4 | |
| # - name: "Setup Flutter SDK" | |
| # uses: subosito/flutter-action@v2 | |
| # with: | |
| # flutter-version: ${{ matrix.sdk }} | |
| # cache: true | |
| # - name: "Enable Flutter web support" | |
| # run: flutter config --enable-web | |
| # - name: "Install dependencies" | |
| # run: flutter pub get | |
| # - name: "Run web integration tests" | |
| # run: xvfb-run -a flutter drive --driver=test_driver/integration_test.dart --target=integration_test/main.dart -d chrome --timeout 120 --dart-define=FLUTTER_WEB_USE_SKIA=true | |
| # score: | |
| # name: "Package score" | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Checkout project | |
| # uses: actions/checkout@v6 | |
| # - name: Setup Flutter | |
| # uses: subosito/flutter-action@v2 | |
| # with: { cache: true } | |
| # - name: Install pana | |
| # run: | | |
| # sudo apt-get install webp && \ | |
| # dart pub global activate pana | |
| # - name: Get dependencies | |
| # run: flutter pub get | |
| # - name: Check package score | |
| # working-directory: packages/maplibre | |
| # run: pana --exit-code-threshold 70 --no-dartdoc . | |
| build-android: | |
| name: "[Android] Build APK" | |
| runs-on: ubuntu-latest | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.sdk }} | |
| cache: true | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Build example APK | |
| run: flutter build apk | |
| - name: Upload apk as artifact | |
| uses: actions/upload-artifact@v7 | |
| if: ${{ matrix.sdk == '' }} | |
| with: | |
| name: maplibre-flutter-demo.apk | |
| path: examples/build/app/outputs/flutter-apk/app-release.apk | |
| build-ios: | |
| name: "[iOS] Build package" | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.sdk }} | |
| cache: true | |
| - name: "Enable Swift Package Manager" # SPM requires config flag | |
| run: flutter config --enable-swift-package-manager | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: "Build iOS package" | |
| run: flutter build ios --simulator --no-codesign | |
| - name: Upload Runner.app as artifact | |
| if: ${{ matrix.sdk == '' }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: maplibre-flutter-demo.app | |
| path: examples/build/ios/iphonesimulator/Runner.app | |
| build-web: | |
| name: "[Web] Build" | |
| runs-on: ubuntu-latest | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.sdk }} | |
| cache: true | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Build web | |
| run: flutter build web | |
| build-windows: | |
| name: "[Windows] Build" | |
| runs-on: windows-latest | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.sdk }} | |
| cache: true | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Build windows | |
| run: flutter build windows --debug | |
| build-macos: | |
| name: "[macOS] Build" | |
| runs-on: macos-latest | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.sdk }} | |
| cache: true | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Build macOS | |
| run: flutter build macos --debug | |
| build-web-wasm: | |
| name: "[Web] Build WASM" | |
| runs-on: ubuntu-latest | |
| defaults: { run: { working-directory: examples } } | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sdk: [ '3.38.10', '' ] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ matrix.sdk }} | |
| cache: true | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Build web | |
| run: flutter build web --wasm | |
| codegen-android: | |
| name: "[Android] Check codegen" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: subosito/flutter-action@v2 | |
| with: { cache: true } | |
| - uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| - name: "Get Flutter dependencies" | |
| run: dart pub get | |
| - name: Build example APK | |
| working-directory: examples | |
| run: flutter build apk | |
| - name: Run jnigen | |
| working-directory: packages/maplibre_android | |
| run: dart tool/jnigen.dart | |
| - name: Format code | |
| run: dart format packages/maplibre_android/lib/src/jni.g.dart | |
| - name: Check changes | |
| run: | | |
| if [[ -n "$(git status --porcelain)" ]]; then | |
| echo "❌ Uncommitted changes detected in files:" | |
| git diff | |
| exit 1 | |
| else | |
| echo "✅ No uncommitted changes" | |
| fi | |
| # codegen-ios: | |
| # name: "[iOS] Check codegen" | |
| # runs-on: macos-latest | |
| # timeout-minutes: 30 | |
| # steps: | |
| # - uses: actions/checkout@v6 | |
| # - name: Clone maplibre-native with shallow submodules | |
| # run: | | |
| # git clone \ | |
| # --depth 1 \ | |
| # --filter=blob:none \ | |
| # --recurse-submodules \ | |
| # --shallow-submodules \ | |
| # --jobs 8 \ | |
| # https://github.com/maplibre/maplibre-native ../maplibre-native | |
| # - uses: subosito/flutter-action@v2 | |
| # with: | |
| # cache: true | |
| # - run: flutter config --enable-swift-package-manager | |
| # - name: "Get Flutter dependencies" | |
| # working-directory: packages/maplibre_ios | |
| # run: dart pub get | |
| # - name: Build MapLibre Native | |
| # working-directory: packages/maplibre_ios/ios | |
| # run: ./build_maplibre.sh | |
| # - name: Generate headers for Swift code | |
| # working-directory: packages/maplibre_ios/ios/maplibre_ios/Sources/maplibre_ios | |
| # run: ./gen_swift_headers.sh | |
| # - name: Run ffigen | |
| # working-directory: packages/maplibre_ios | |
| # run: dart tool/ffigen.dart | |
| # - name: Check changes | |
| # run: | | |
| # if [[ -n "$(git status --porcelain)" ]]; then | |
| # echo "❌ Uncommitted changes detected in files:" | |
| # git diff --name-only | |
| # exit 1 | |
| # else | |
| # echo "✅ No uncommitted changes" | |
| # fi |