docs: Replace flutter_workmanager with workmanager and remove marketi… #14
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, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| workflow_dispatch: | |
| jobs: | |
| analyze: | |
| name: Dart Analyze | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Verify formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| - name: Analyze project | |
| run: flutter analyze --no-fatal-infos | |
| test: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Run tests | |
| run: flutter test --coverage --reporter=expanded | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage/lcov.info | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: false | |
| verbose: true | |
| build-android: | |
| name: Build Android | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Setup Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| cache: 'gradle' | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Build Android plugin | |
| run: | | |
| cd example/android | |
| ./gradlew build --stacktrace | |
| - name: Run Android unit tests | |
| run: | | |
| cd example/android | |
| ./gradlew test | |
| build-ios: | |
| name: Build iOS | |
| runs-on: macos-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Install CocoaPods | |
| run: | | |
| cd example/ios | |
| pod install | |
| - name: Build iOS plugin | |
| run: | | |
| cd example/ios | |
| xcodebuild build \ | |
| -workspace Runner.xcworkspace \ | |
| -scheme Runner \ | |
| -sdk iphonesimulator \ | |
| -destination 'platform=iOS Simulator,name=iPhone 15,OS=latest' \ | |
| CODE_SIGNING_ALLOWED=NO \ | |
| | xcpretty | |
| publish-dry-run: | |
| name: Publish Dry Run | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| if: github.event_name == 'pull_request' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.19.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Dry run publish | |
| run: dart pub publish --dry-run | |
| status-check: | |
| name: All Checks Passed | |
| runs-on: ubuntu-latest | |
| needs: [analyze, test, build-android, build-ios] | |
| if: always() | |
| steps: | |
| - name: Check all jobs | |
| run: | | |
| if [[ "${{ needs.analyze.result }}" != "success" ]] || \ | |
| [[ "${{ needs.test.result }}" != "success" ]] || \ | |
| [[ "${{ needs.build-android.result }}" != "success" ]] || \ | |
| [[ "${{ needs.build-ios.result }}" != "success" ]]; then | |
| echo "❌ One or more jobs failed" | |
| exit 1 | |
| fi | |
| echo "✅ All checks passed!" |