Skip to content

Commit 8735f71

Browse files
committed
chore: rename e2e pipeline and add iOS testing steps with Firebase configuration
1 parent a4fd6e9 commit 8735f71

1 file changed

Lines changed: 55 additions & 1 deletion

File tree

.github/workflows/e2e_tests_pipeline.yaml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pipeline-e2e
1+
name: e2e-pipeline
22

33
concurrency:
44
group: ${{ github.workflow }}-${{ github.ref }}
@@ -9,6 +9,7 @@ on:
99
paths:
1010
- 'packages/cloud_firestore/cloud_firestore/pipeline_example/**'
1111
- 'packages/cloud_firestore/cloud_firestore/lib/**'
12+
- '.github/workflows/e2e_tests_pipeline.yaml'
1213
push:
1314
branches:
1415
- main
@@ -17,6 +18,7 @@ on:
1718
paths:
1819
- 'packages/cloud_firestore/cloud_firestore/pipeline_example/**'
1920
- 'packages/cloud_firestore/cloud_firestore/lib/**'
21+
- '.github/workflows/e2e_tests_pipeline.yaml'
2022

2123
jobs:
2224
pipeline-e2e-android:
@@ -140,3 +142,55 @@ jobs:
140142
working-directory: packages/cloud_firestore/cloud_firestore/pipeline_example
141143
run: |
142144
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

Comments
 (0)