Skip to content

Commit 9a9105e

Browse files
committed
Attempt to have nested class for realtime pipeline
1 parent 545ac38 commit 9a9105e

File tree

4 files changed

+396
-368
lines changed

4 files changed

+396
-368
lines changed

.github/workflows/firestore_ci_tests.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,67 @@ jobs:
250250
retention-days: 7
251251
if-no-files-found: ignore
252252

253+
firestore_emulator_integ_tests:
254+
name: "System Tests Against Emulator"
255+
runs-on: ubuntu-latest
256+
needs:
257+
- determine_changed
258+
# only run on post submit or PRs not originating from forks.
259+
if: ((github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && contains(fromJSON(needs.determine_changed.outputs.modules), ':firebase-firestore')
260+
strategy:
261+
fail-fast: false
262+
263+
steps:
264+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
265+
with:
266+
fetch-depth: 2
267+
submodules: true
268+
269+
- name: Enable KVM
270+
run: |
271+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
272+
sudo udevadm control --reload-rules
273+
sudo udevadm trigger --name-match=kvm
274+
275+
- name: Set up JDK 21
276+
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4.7.0
277+
with:
278+
java-version: 21
279+
distribution: temurin
280+
cache: gradle
281+
282+
- uses: google-github-actions/setup-gcloud@77e7a554d41e2ee56fc945c52dfd3f33d12def9a # v2.1.4
283+
284+
- name: Start Emulator
285+
env:
286+
EXPERIMENTAL_MODE: true
287+
run: |
288+
gcloud emulators firestore start
289+
290+
- name: Firestore Emulator Integ Tests
291+
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
292+
env:
293+
FIREBASE_CI: 1
294+
FTL_RESULTS_BUCKET: android-ci
295+
FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}}
296+
FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }}
297+
with:
298+
api-level: 31
299+
arch: x86_64
300+
ram-size: 4096M
301+
heap-size: 4096M
302+
script: |
303+
adb logcat -v time > logcat.txt &
304+
./gradlew firebase-firestore:connectedCheck withErrorProne -PtargetBackend="emulator"
305+
- name: Upload logs
306+
if: failure()
307+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
308+
with:
309+
name: emulator-logcat.txt
310+
path: logcat.txt
311+
retention-days: 7
312+
if-no-files-found: ignore
313+
253314
check-required-tests:
254315
runs-on: ubuntu-latest
255316
if: always()

0 commit comments

Comments
 (0)