@@ -100,8 +100,11 @@ jobs:
100
100
101
101
- name : Enable KVM Group Permissions for Android Emulator
102
102
run : |
103
- ./firebase-dataconnect/ci.zsh \
104
- kvm_setup
103
+ set -euo pipefail
104
+ echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
105
+ | sudo tee /etc/udev/rules.d/99-kvm4all.rules
106
+ sudo udevadm control --reload-rules
107
+ sudo udevadm trigger --name-match=kvm
105
108
106
109
- name : Restore AVD Cache
107
110
uses : actions/cache/restore@d4323d4df104b026a6aa633fdb11d772146be0bf # 4.2.2
@@ -135,23 +138,42 @@ jobs:
135
138
~/.android/adb*
136
139
key : avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
137
140
138
- - name : Start Firebase Emulators
141
+ - name : Data Connect Emulator Start
142
+ id : data-connect-emulator
139
143
run : |
140
- ./firebase-dataconnect/ci.zsh \
141
- start_firebase_emulators \
142
- -firebase_command '${{ env.FDC_FIREBASE_COMMAND }}' \
143
- -postgres_connection_url 'postgresql://postgres:[email protected] :5432?sslmode=disable' \
144
- -log_file firebase.emulators.log \
145
- -enable_debug_logs ${{ runner.debug || '0' }}
144
+ set -euo pipefail
145
+ set -xv
146
+
147
+ echo 'emulator.postgresConnectionUrl=postgresql://postgres:[email protected] :5432?sslmode=disable' > firebase-dataconnect/dataconnect.local.properties
148
+
149
+ ./gradlew \
150
+ ${{ (inputs.gradleInfoLog && '--info') || '' }} \
151
+ :firebase-dataconnect:connectors:runDebugDataConnectEmulator \
152
+ >firebase.emulator.dataconnect.log 2>&1 &
153
+
154
+ echo "FIREBASE_DATA_CONNECT_EMULATOR_PID=$!" >> "$GITHUB_ENV"
155
+
156
+ - name : Firebase Auth Emulator Start
157
+ id : firebase-auth-emulator
158
+ run : |
159
+ set -euo pipefail
160
+ set -xv
161
+
162
+ cd firebase-dataconnect/emulator
163
+ ${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth >firebase.emulator.auth.log 2>&1 &
164
+
165
+ echo "FIREBASE_AUTH_EMULATOR_PID=$!" >> "$GITHUB_ENV"
146
166
147
167
- name : Logcat Log Capture Start
148
168
id : logcat-capture
149
169
continue-on-error : true
150
170
run : |
151
- ./firebase-dataconnect/ci.zsh \
152
- start_logcat_capture \
153
- -adb_command "$ANDROID_HOME/platform-tools/adb" \
154
- -log_file logcat.log
171
+ set -euo pipefail
172
+ set -xv
173
+
174
+ "$ANDROID_HOME/platform-tools/adb" logcat >logcat.log 2>&1 &
175
+
176
+ echo "LOGCAT_PID=$!" >> "$GITHUB_ENV"
155
177
156
178
- name : Gradle connectedCheck
157
179
id : connectedCheck
@@ -185,10 +207,11 @@ jobs:
185
207
compression-level : 9
186
208
187
209
- name : Verify "Gradle connectedCheck" Step Was Successful
210
+ if : steps.connectedCheck.outcome != 'success'
188
211
run : |
189
- ./firebase-dataconnect/ci.zsh \
190
- verify_connected_check_success \
191
- -connected_check_step_outcome '${{ steps.connectedCheck.outcome }}'
212
+ set -euo pipefail
213
+ echo 'Failing because the outcome of the "Gradle connectedCheck" step ("${{ steps.connectedCheck.outcome }}") was not successful'
214
+ exit 1
192
215
193
216
# Check this yml file with "actionlint": https://github.com/rhysd/actionlint
194
217
# To run actionlint yourself, run `brew install actionlint` followed by
@@ -212,17 +235,12 @@ jobs:
212
235
issues : write
213
236
runs-on : ubuntu-latest
214
237
steps :
215
- - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
216
- with :
217
- show-progress : false
218
- sparse-checkout : ' firebase-dataconnect/ci.zsh'
219
-
220
238
- name : Post Comment on Issue
221
239
# if: github.event_name == 'schedule'
222
240
env :
223
241
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
224
242
run : |
225
- set -eu
243
+ set -euo pipefail
226
244
227
245
if [[ '${{ github.event_name }}' == 'schedule' ]] ; then
228
246
readonly github_notification_issue=6857
@@ -231,14 +249,12 @@ jobs:
231
249
readonly github_notification_issue=6863
232
250
fi
233
251
234
- ./firebase-dataconnect/ci.zsh \
235
- send_notifications \
236
- -github_notification_issue $github_notification_issue \
237
- -github_workflow_name '${{ github.workflow }}' \
238
- -github_repository '${{ github.repository }}' \
239
- -job_status '${{ job.status }}' \
240
- -git_commit_hash '${{ github.sha }}' \
241
- -run_url '${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}' \
242
- -run_id '${{ github.run_id }}' \
243
- -run_number '${{ github.run_number }}' \
244
- -run_attempt '${{ github.run_attempt }}'
252
+ cat >message.txt <<EOF
253
+ Result of workflow ${{ github.workflow }} at ${{ github.ref }}: ${{ job.status }}
254
+ ${{ github.event.repository.html_url }}/actions/runs/${{ github.run_id }}
255
+ job=${{ github.job }} run_id=${{ github.run_id }} run_number=${{ github.run_number }} run_attempt=${{ github.run_attempt }}
256
+ EOF
257
+
258
+ echo "Posting comment on GitHub Issue: https://github.com/firebase/firebase-android-sdk/issues/$github_notification_issue:"
259
+ cat message.txt
260
+ gh issue comment $github_notification_issue --body-file message.txt -R ${{ github.repository }}
0 commit comments