-
Notifications
You must be signed in to change notification settings - Fork 102
Update firebase emulator data and add github action for Android e2e tests #2327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
andreia-ferreira
merged 22 commits into
master
from
andreia/3365/add-e2e-test-data-to-firebase-emulator
Jan 15, 2026
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
6fe62d1
Update firebase emulator data for Android e2e tests
andreia-ferreira e578fb2
Update local data with latest test version
andreia-ferreira 8b683b3
Add dedicated action for android tests
andreia-ferreira b6c52e8
Revert local data changes
andreia-ferreira f5ec2ef
Replace npm script for android tests with equivalent nx target
andreia-ferreira feb6b81
Add auth port for firebase emulator
andreia-ferreira f64d157
Update start-emulator action with nx targets
andreia-ferreira 81eeff3
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
rfontanarosa 2be602c
Remove unused job from android test data
andreia-ferreira 4c71455
Merge remote-tracking branch 'origin/andreia/3365/add-e2e-test-data-t…
andreia-ferreira c435acd
Add debug data to action
andreia-ferreira a2a0e80
Fix debug data
andreia-ferreira 7acda51
Fix debug data
andreia-ferreira 8291449
Remove debug code
andreia-ferreira 1379a77
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira 01ae8a8
Update emulator to run in the background and add logging
andreia-ferreira 03302bf
Remove changes from data/localfolder
andreia-ferreira 9b7530a
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira cecf435
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira 15603b8
add path and working directory to action
andreia-ferreira ceed47a
remove unused job from test survey
andreia-ferreira f830583
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| # Copyright 2026 The Ground Authors. | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| name: Start Firebase emulator for Android tests | ||
|
|
||
| inputs: | ||
| platform-repository: | ||
| description: "ground-platform repository under test" | ||
| default: google/ground-platform | ||
|
|
||
| runs: | ||
| using: "composite" | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: ${{ inputs.platform-repository }} | ||
| path: ground-platform | ||
|
|
||
| - name: Load cached Firebase emulator | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cache/firebase/emulators | ||
| key: ${{ runner.os }}-firebase-emulators-${{ github.sha }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-firebase-emulators- | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: "20" | ||
|
|
||
| - name: Load cached Node modules | ||
| id: cache-npm | ||
| uses: actions/cache@v4 | ||
| env: | ||
| cache-name: cache-node-modules | ||
| with: | ||
| # npm cache files are stored in `~/.npm` on Linux/macOS | ||
| path: ~/.npm | ||
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-build-${{ env.cache-name }}- | ||
| ${{ runner.os }}-build- | ||
| ${{ runner.os }}- | ||
|
|
||
| - name: Install nx-linux-x64-gnu | ||
| working-directory: ground-platform | ||
| shell: bash | ||
| run: npm install @nx/nx-linux-x64-gnu | ||
|
|
||
| - name: Install dependencies | ||
| working-directory: ground-platform | ||
| shell: bash | ||
| run: npm install | ||
|
|
||
| - name: Build project and local deps | ||
| working-directory: ground-platform | ||
| shell: bash | ||
| run: npx nx build | ||
|
|
||
| - name: Start Firebase emulator with Android test data | ||
| working-directory: ground-platform | ||
| shell: bash | ||
| run: | | ||
| npx nx start-android-test-data > firebase-emulator.log 2>&1 & | ||
|
|
||
| for i in {1..30}; do | ||
| if curl -s http://localhost:4000 > /dev/null 2>&1; then | ||
| echo "Firebase emulator started!" | ||
| exit 0 | ||
| fi | ||
| echo "Waiting for Firebase emulator to start... ($i/30)" | ||
| sleep 5 | ||
| done | ||
|
|
||
| echo "Firebase Emulator failed to start" | ||
| cat firebase-emulator.log | ||
| exit 1 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"kind":"identitytoolkit#DownloadAccountResponse","users":[]} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {"signIn":{"allowDuplicateEmails":false},"emailPrivacyConfig":{"enableImprovedEmailPrivacy":false}} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "version": "14.27.0", | ||
| "firestore": { | ||
| "version": "1.19.8", | ||
| "path": "firestore_export", | ||
| "metadata_file": "firestore_export/firestore_export.overall_export_metadata" | ||
| }, | ||
| "auth": { | ||
| "version": "14.27.0", | ||
| "path": "auth_export" | ||
| } | ||
| } |
Binary file added
BIN
+52 Bytes
...ndroid/firestore_export/all_namespaces/all_kinds/all_namespaces_all_kinds.export_metadata
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+96 Bytes
data/test-android/firestore_export/firestore_export.overall_export_metadata
Binary file not shown.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,9 @@ | |
| ] | ||
| }, | ||
| "emulators": { | ||
| "auth": { | ||
| "port": 9099 | ||
| }, | ||
| "functions": { | ||
| "port": 5001 | ||
| }, | ||
|
|
||
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.