Skip to content
Merged
Show file tree
Hide file tree
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 Dec 19, 2025
e578fb2
Update local data with latest test version
andreia-ferreira Dec 22, 2025
8b683b3
Add dedicated action for android tests
andreia-ferreira Dec 23, 2025
b6c52e8
Revert local data changes
andreia-ferreira Dec 23, 2025
f5ec2ef
Replace npm script for android tests with equivalent nx target
andreia-ferreira Jan 2, 2026
feb6b81
Add auth port for firebase emulator
andreia-ferreira Jan 2, 2026
f64d157
Update start-emulator action with nx targets
andreia-ferreira Jan 2, 2026
81eeff3
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
rfontanarosa Jan 5, 2026
2be602c
Remove unused job from android test data
andreia-ferreira Jan 5, 2026
4c71455
Merge remote-tracking branch 'origin/andreia/3365/add-e2e-test-data-t…
andreia-ferreira Jan 5, 2026
c435acd
Add debug data to action
andreia-ferreira Jan 5, 2026
a2a0e80
Fix debug data
andreia-ferreira Jan 5, 2026
7acda51
Fix debug data
andreia-ferreira Jan 5, 2026
8291449
Remove debug code
andreia-ferreira Jan 5, 2026
1379a77
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira Jan 12, 2026
01ae8a8
Update emulator to run in the background and add logging
andreia-ferreira Jan 12, 2026
03302bf
Remove changes from data/localfolder
andreia-ferreira Jan 12, 2026
9b7530a
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira Jan 12, 2026
cecf435
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira Jan 14, 2026
15603b8
add path and working directory to action
andreia-ferreira Jan 14, 2026
ceed47a
remove unused job from test survey
andreia-ferreira Jan 15, 2026
f830583
Merge branch 'master' into andreia/3365/add-e2e-test-data-to-firebase…
andreia-ferreira Jan 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions .github/actions/start-emulator/action.yml
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
1 change: 1 addition & 0 deletions data/test-android/auth_export/accounts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"kind":"identitytoolkit#DownloadAccountResponse","users":[]}
1 change: 1 addition & 0 deletions data/test-android/auth_export/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"signIn":{"allowDuplicateEmails":false},"emailPrivacyConfig":{"enableImprovedEmailPrivacy":false}}
12 changes: 12 additions & 0 deletions data/test-android/firebase-export-metadata.json
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 not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions firebase.local.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
]
},
"emulators": {
"auth": {
"port": 9099
},
"functions": {
"port": 5001
},
Expand Down
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,18 @@
"build"
]
},
"start-android-test-data": {
"executor": "nx:run-commands",
"options": {
"commands": [
"firebase experiments:enable webframeworks",
"firebase emulators:start --project demo-local --config firebase.local.json --import data/test-android"
]
},
"dependsOn": [
"build"
]
},
"deploy": {
"executor": "nx:run-commands",
"configurations": {
Expand Down Expand Up @@ -110,4 +122,4 @@
"overrides": {
"eslint-plugin-n": "^17.0.0"
}
}
}