|
1 | | -name: pipeline-e2e |
| 1 | +name: e2e-pipeline |
2 | 2 |
|
3 | 3 | concurrency: |
4 | 4 | group: ${{ github.workflow }}-${{ github.ref }} |
|
9 | 9 | paths: |
10 | 10 | - 'packages/cloud_firestore/cloud_firestore/pipeline_example/**' |
11 | 11 | - 'packages/cloud_firestore/cloud_firestore/lib/**' |
| 12 | + - '.github/workflows/e2e_tests_pipeline.yaml' |
12 | 13 | push: |
13 | 14 | branches: |
14 | 15 | - main |
|
17 | 18 | paths: |
18 | 19 | - 'packages/cloud_firestore/cloud_firestore/pipeline_example/**' |
19 | 20 | - 'packages/cloud_firestore/cloud_firestore/lib/**' |
| 21 | + - '.github/workflows/e2e_tests_pipeline.yaml' |
20 | 22 |
|
21 | 23 | jobs: |
22 | 24 | pipeline-e2e-android: |
@@ -140,3 +142,55 @@ jobs: |
140 | 142 | working-directory: packages/cloud_firestore/cloud_firestore/pipeline_example |
141 | 143 | run: | |
142 | 144 | flutter test integration_test/pipeline/pipeline_live_test.dart --timeout 10x --dart-define=CI=true -d chrome |
| 145 | +
|
| 146 | + pipeline-e2e-ios: |
| 147 | + if: ${{ secrets.PIPELINE_E2E_FIREBASE_OPTIONS_DART != '' }} |
| 148 | + runs-on: macos-15 |
| 149 | + timeout-minutes: 50 |
| 150 | + steps: |
| 151 | + - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 |
| 152 | + - uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a |
| 153 | + name: Install Node.js 20 |
| 154 | + with: |
| 155 | + node-version: '20' |
| 156 | + - name: Xcode |
| 157 | + run: sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer |
| 158 | + - uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b |
| 159 | + with: |
| 160 | + distribution: 'temurin' |
| 161 | + java-version: '21' |
| 162 | + - uses: subosito/flutter-action@f2c4f6686ca8e8d6e6d0f28410eeef506ed66aff |
| 163 | + with: |
| 164 | + channel: 'stable' |
| 165 | + cache: true |
| 166 | + cache-key: "flutter-:os:-:channel:-:version:-:arch:-:hash:" |
| 167 | + pub-cache-key: "flutter-pub-:os:-:channel:-:version:-:arch:-:hash:" |
| 168 | + - uses: bluefireteam/melos-action@c7dcb921b23cc520cace360b95d02b37bf09cdaa |
| 169 | + with: |
| 170 | + run-bootstrap: false |
| 171 | + melos-version: '5.3.0' |
| 172 | + - name: Inject Firebase config for pipeline E2E |
| 173 | + env: |
| 174 | + FIREBASE_OPTIONS_DART: ${{ secrets.PIPELINE_E2E_FIREBASE_OPTIONS_DART }} |
| 175 | + GOOGLE_SERVICES_JSON: ${{ secrets.PIPELINE_E2E_GOOGLE_SERVICES_JSON }} |
| 176 | + GOOGLE_SERVICE_INFO_PLIST: ${{ secrets.PIPELINE_E2E_GOOGLE_SERVICE_INFO_PLIST }} |
| 177 | + run: | |
| 178 | + echo "$FIREBASE_OPTIONS_DART" > packages/cloud_firestore/cloud_firestore/pipeline_example/lib/firebase_options.dart |
| 179 | + echo "$GOOGLE_SERVICES_JSON" > packages/cloud_firestore/cloud_firestore/pipeline_example/android/app/google-services.json |
| 180 | + echo "$GOOGLE_SERVICE_INFO_PLIST" > packages/cloud_firestore/cloud_firestore/pipeline_example/ios/Runner/GoogleService-Info.plist |
| 181 | + - name: Bootstrap package |
| 182 | + run: melos bootstrap --scope "cloud_firestore*" |
| 183 | + - uses: futureware-tech/simulator-action@e89aa8f93d3aec35083ff49d2854d07f7186f7f5 |
| 184 | + id: simulator |
| 185 | + with: |
| 186 | + model: "iPhone 16" |
| 187 | + - name: Build iOS (simulator) |
| 188 | + working-directory: packages/cloud_firestore/cloud_firestore/pipeline_example |
| 189 | + run: | |
| 190 | + flutter build ios --no-codesign --simulator --debug --target=./integration_test/pipeline/pipeline_live_test.dart --dart-define=CI=true |
| 191 | + - name: Run pipeline E2E tests (iOS) |
| 192 | + working-directory: packages/cloud_firestore/cloud_firestore/pipeline_example |
| 193 | + env: |
| 194 | + SIMULATOR: ${{ steps.simulator.outputs.udid }} |
| 195 | + run: | |
| 196 | + flutter test integration_test/pipeline/pipeline_live_test.dart -d "$SIMULATOR" --timeout 10x --dart-define=CI=true |
0 commit comments