Implement a Virtusize Widget #32
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: Pull request CI checks | |
| on: | |
| pull_request: | |
| branches: ['**'] | |
| workflow_dispatch: | |
| jobs: | |
| flutter_tests: | |
| name: Flutter Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Run Flutter tests | |
| run: flutter test | |
| android_tests: | |
| name: Android Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '17' | |
| distribution: 'adopt' | |
| cache: gradle | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Clean Gradle cache | |
| working-directory: ./example/android | |
| run: rm -rf ~/.gradle/caches/ | |
| - name: Run Android tests | |
| working-directory: ./example/android | |
| run: ./gradlew testDebugUnitTest -x :url_launcher_android:testDebugUnitTest | |
| - uses: actions/upload-artifact@v4 | |
| if: failure() | |
| with: | |
| name: unit-test-report | |
| path: ./**/build/reports/tests/testDebugUnitTest/ | |
| ios_tests: | |
| name: iOS Tests | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: | | |
| flutter pub get | |
| cd example/ios | |
| pod install | |
| - name: Build and Test iOS | |
| working-directory: ./example/ios | |
| run: | | |
| xcodebuild clean test \ | |
| -quiet \ | |
| -workspace "Runner.xcworkspace" \ | |
| -scheme "Runner" \ | |
| -sdk "iphonesimulator" \ | |
| -destination "platform=iOS Simulator,name=iPhone SE (3rd generation),OS=latest" | |
| publish_dry_run: | |
| name: Validate package for publishing | |
| needs: [flutter_tests, android_tests, ios_tests] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Publish dry run | |
| run: flutter pub publish --dry-run | |
| build_example: | |
| name: Build Example App | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.29.0' | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: | | |
| flutter pub get | |
| cd example | |
| flutter pub get | |
| - name: Build example | |
| working-directory: ./example | |
| run: flutter build |