Skip to content

Commit 887ff86

Browse files
committed
dataconnect.yml: use firebase-tools to launch fdc emulator instead of gradle
1 parent bd2cb5f commit 887ff86

File tree

1 file changed

+6
-32
lines changed

1 file changed

+6
-32
lines changed

.github/workflows/dataconnect.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ env:
2525
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
2626
FDC_ANDROID_EMULATOR_API_LEVEL: ${{ inputs.androidEmulatorApiLevel || '34' }}
2727
FDC_NODEJS_VERSION: ${{ inputs.nodeJsVersion || '20' }}
28-
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '13.29.1' }}
28+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '14.2.0' }}
2929
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
3030
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
3131
FDC_PYTHON_VERSION: ${{ inputs.pythonVersion || '3.13' }}
@@ -76,7 +76,6 @@ jobs:
7676
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}
7777
7878
- name: Restore Gradle Cache
79-
id: restore-gradle-cache
8079
uses: actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # 4.2.2
8180
if: github.event_name != 'schedule'
8281
with:
@@ -172,43 +171,19 @@ jobs:
172171
~/.android/adb*
173172
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
174173

175-
- name: Data Connect Emulator Start
176-
id: data-connect-emulator
174+
- name: Start Firebase Emulators
177175
run: |
178-
set -euo pipefail
179-
set -xv
180-
181-
echo 'emulator.postgresConnectionUrl=postgresql://postgres:[email protected]:5432?sslmode=disable' > firebase-dataconnect/dataconnect.local.properties
182-
183-
./gradlew \
184-
${{ (inputs.gradleInfoLog && '--info') || '' }} \
185-
:firebase-dataconnect:connectors:runDebugDataConnectEmulator \
186-
>firebase.emulator.dataconnect.log 2>&1 &
187-
188-
echo "FIREBASE_DATA_CONNECT_EMULATOR_PID=$!" >> "$GITHUB_ENV"
189-
190-
- name: Firebase Auth Emulator Start
191-
id: firebase-auth-emulator
192-
run: |
193-
set -euo pipefail
194-
set -xv
195-
176+
set -xveuo pipefail
177+
export FIREBASE_DATACONNECT_POSTGRESQL_STRING='postgresql://postgres:[email protected]:5432?sslmode=disable'
196178
cd firebase-dataconnect/emulator
197-
${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth >firebase.emulator.auth.log 2>&1 &
198-
199-
echo "FIREBASE_AUTH_EMULATOR_PID=$!" >> "$GITHUB_ENV"
179+
${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth,dataconnect >firebase.emulators.log 2>&1 &
200180
201181
- name: Logcat Log Capture Start
202-
id: logcat-capture
203182
continue-on-error: true
204183
run: |
205-
set -euo pipefail
206-
set -xv
207-
184+
set -xveuo pipefail
208185
"$ANDROID_HOME/platform-tools/adb" logcat >logcat.log 2>&1 &
209186
210-
echo "LOGCAT_PID=$!" >> "$GITHUB_ENV"
211-
212187
- name: Gradle connectedCheck
213188
id: connectedCheck
214189
uses: reactivecircus/android-emulator-runner@62dbb605bba737720e10b196cb4220d374026a6d #v2.33.0
@@ -360,7 +335,6 @@ jobs:
360335
run: echo '${{ secrets.GITHUB_TOKEN }}' | gh auth login --with-token
361336

362337
- name: Create Job Results File
363-
id: create-job-results-file
364338
run: |
365339
set -xveuo pipefail
366340
cat >'${{ runner.temp }}/job_results.txt' <<EOF

0 commit comments

Comments
 (0)