|
72 | 72 | - '**/analysis_options.yaml' |
73 | 73 |
|
74 | 74 | # ── PR: fast single-OS run — only changed packages ───────────────────────── |
| 75 | + android-compile: |
| 76 | + name: Compile (Android) |
| 77 | + runs-on: ubuntu-22.04 |
| 78 | + needs: path-filter |
| 79 | + if: >- |
| 80 | + github.event_name == 'pull_request' && |
| 81 | + needs.path-filter.outputs.changed_any_dart == 'true' |
| 82 | +
|
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + - name: Setup Java |
| 86 | + uses: actions/setup-java@v3 |
| 87 | + with: |
| 88 | + distribution: 'zulu' |
| 89 | + java-version: '17' |
| 90 | + - name: Setup Flutter |
| 91 | + uses: subosito/flutter-action@v2 |
| 92 | + with: |
| 93 | + flutter-version: ${{ env.FLUTTER_VERSION }} |
| 94 | + channel: stable |
| 95 | + cache: true |
| 96 | + - name: flutter pub get |
| 97 | + run: flutter pub get |
| 98 | + - name: Check Android compileSdk |
| 99 | + working-directory: example/android |
| 100 | + run: ./gradlew assembleDebug |
| 101 | + |
| 102 | + emulator-tests: |
| 103 | + name: Integration Tests (Emulator) |
| 104 | + runs-on: macos-latest |
| 105 | + needs: path-filter |
| 106 | + if: >- |
| 107 | + github.event_name == 'pull_request' && |
| 108 | + needs.path-filter.outputs.changed_any_dart == 'true' |
| 109 | + strategy: |
| 110 | + fail-fast: false |
| 111 | + matrix: |
| 112 | + platform: [android, ios] |
| 113 | + steps: |
| 114 | + - uses: actions/checkout@v4 |
| 115 | + - name: Setup Java |
| 116 | + if: matrix.platform == 'android' |
| 117 | + uses: actions/setup-java@v3 |
| 118 | + with: |
| 119 | + distribution: 'zulu' |
| 120 | + java-version: '17' |
| 121 | + - name: Setup Flutter |
| 122 | + uses: subosito/flutter-action@v2 |
| 123 | + with: |
| 124 | + flutter-version: ${{ env.FLUTTER_VERSION }} |
| 125 | + channel: stable |
| 126 | + cache: true |
| 127 | + - name: flutter pub get |
| 128 | + run: flutter pub get |
| 129 | + - name: Run Android Emulator Tests |
| 130 | + if: matrix.platform == 'android' |
| 131 | + uses: reactivecircus/android-emulator-runner@v2 |
| 132 | + with: |
| 133 | + api-level: 29 |
| 134 | + arch: arm64-v8a |
| 135 | + script: flutter test test/integration/ |
| 136 | + - name: Run iOS Simulator Tests |
| 137 | + if: matrix.platform == 'ios' |
| 138 | + run: | |
| 139 | + xcrun simctl list devicetypes |
| 140 | + flutter test test/integration/ -d "iPhone 15" || flutter test test/integration/ |
| 141 | +
|
75 | 142 | test-pr: |
76 | 143 | name: Tests (PR · ubuntu-22.04 · stable) |
77 | 144 | runs-on: ubuntu-22.04 |
@@ -108,7 +175,10 @@ jobs: |
108 | 175 | if: >- |
109 | 176 | needs.path-filter.outputs.changed_root == 'true' || |
110 | 177 | needs.path-filter.outputs.changed_core == 'true' |
111 | | - run: flutter test --no-pub |
| 178 | + run: | |
| 179 | + # Run root tests, excluding test/golden/ which is handled by golden.yml |
| 180 | + find test -maxdepth 1 -name "*_test.dart" | xargs flutter test --no-pub |
| 181 | + find test -maxdepth 1 -type d -not -path test -not -path test/golden -not -path "test/failures" -not -path "test/.*" | xargs flutter test --no-pub |
112 | 182 |
|
113 | 183 | - name: Test hyper_render_core |
114 | 184 | if: needs.path-filter.outputs.changed_core == 'true' |
|
0 commit comments