natsuk4ze/gal

View on GitHub
.github/workflows/ci_macos.yml

Summary

Maintainability
Test Coverage
name: macOS Integration Tests

on:
  workflow_call:

jobs:
  macos:
    runs-on: macos-${{ matrix.macos-version }}
    timeout-minutes: 30
    strategy:
      matrix:
        macos-version: [13, 14, 15]
        package_manager: [cocoapods, swiftpm]
      fail-fast: false
    steps:
      - name: Check out
        uses: actions/checkout@v4

      - name: Setup Flutter SDK
        timeout-minutes: 10
        uses: subosito/flutter-action@v2
        with:
          channel: beta
          cache: true

      - name: Set Package Manager Configuration
        run: |
          if [ "${{ matrix.package_manager }}" == "cocoapods" ]; then
            flutter config --no-enable-swift-package-manager
          else
            flutter config --enable-swift-package-manager
          fi

      - name: Run integration tests
        id: Run-integration-tests
        timeout-minutes: 15
        run: |
          cd example
          flutter test -d macos integration_test/integration_test.dart macos

      - name: Validate Podspec in CocoaPods
        if: matrix.package_manager == 'cocoapods'
        run: |
          pod lib lint darwin/gal.podspec --configuration=Debug --skip-tests --use-modular-headers --use-libraries
          pod lib lint darwin/gal.podspec --configuration=Debug --skip-tests --use-modular-headers