Skip to content

Commit c6fb95e

Browse files
authored
Merge branch 'main' into dependabot/gradle/com.fasterxml.jackson.core-jackson-databind-2.18.2
2 parents 7f12d9b + 9f96db8 commit c6fb95e

File tree

333 files changed

+11178
-5337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+11178
-5337
lines changed

.github/workflows/ci_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ jobs:
119119
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}
120120
exclude:
121121
- module: :firebase-firestore
122+
- module: :firebase-functions:ktx
122123

123124
steps:
124125
- uses: actions/[email protected]

.github/workflows/create_releases.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
./gradlew generateReleaseConfig -PcurrentRelease=${{ inputs.name }} -PpastRelease=${{ inputs.past-name }} -PprintOutput=true
4141
4242
- name: Create Pull Request
43-
uses: peter-evans/create-pull-request@v4
43+
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f
4444
with:
4545
base: 'releases/${{ inputs.name }}'
4646
branch: 'releases/${{ inputs.name }}.release'

.github/workflows/dataconnect.yml

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
name: Data Connect Integration Tests
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
javaVersion:
7+
androidEmulatorApiLevel:
8+
nodeJsVersion:
9+
firebaseToolsVersion:
10+
gradleInfoLog:
11+
type: boolean
12+
pull_request:
13+
paths:
14+
- .github/workflows/dataconnect.yml
15+
- 'firebase-dataconnect/**'
16+
- '!firebase-dataconnect/demo/**'
17+
- '!firebase-dataconnect/scripts/**'
18+
- '!firebase-dataconnect/**/*.md'
19+
- '!firebase-dataconnect/**/*.txt'
20+
schedule:
21+
- cron: '0 11 * * *' # Run nightly at 11am UTC (3am Pacific, 6am Eastern)
22+
23+
env:
24+
FDC_JAVA_VERSION: ${{ inputs.javaVersion || '17' }}
25+
FDC_ANDROID_EMULATOR_API_LEVEL: ${{ inputs.androidEmulatorApiLevel || '34' }}
26+
FDC_NODEJS_VERSION: ${{ inputs.nodeJsVersion || '20' }}
27+
FDC_FIREBASE_TOOLS_VERSION: ${{ inputs.firebaseToolsVersion || '13.29.1' }}
28+
FDC_FIREBASE_TOOLS_DIR: /tmp/firebase-tools
29+
FDC_FIREBASE_COMMAND: /tmp/firebase-tools/node_modules/.bin/firebase
30+
31+
concurrency:
32+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
33+
cancel-in-progress: true
34+
35+
jobs:
36+
integration-test:
37+
continue-on-error: false
38+
runs-on: ubuntu-latest
39+
40+
services:
41+
postgres:
42+
image: postgres
43+
env:
44+
POSTGRES_PASSWORD: password
45+
options: >-
46+
--health-cmd pg_isready
47+
--health-interval 10s
48+
--health-timeout 5s
49+
--health-retries 5
50+
ports:
51+
- 5432:5432
52+
53+
steps:
54+
- uses: actions/checkout@v4
55+
with:
56+
show-progress: false
57+
58+
- uses: actions/setup-java@v4
59+
with:
60+
java-version: ${{ env.FDC_JAVA_VERSION }}
61+
distribution: temurin
62+
63+
- uses: actions/setup-node@v4
64+
with:
65+
node-version: ${{ env.FDC_NODEJS_VERSION }}
66+
67+
- name: install firebase-tools
68+
run: |
69+
set -v
70+
mkdir -p ${{ env.FDC_FIREBASE_TOOLS_DIR }}
71+
cd ${{ env.FDC_FIREBASE_TOOLS_DIR }}
72+
echo '{}' > package.json
73+
npm install --fund=false --audit=false --save --save-exact firebase-tools@${{ env.FDC_FIREBASE_TOOLS_VERSION }}
74+
75+
- name: Restore Gradle cache
76+
id: restore-gradle-cache
77+
uses: actions/cache/restore@v4
78+
if: github.event_name != 'schedule'
79+
with:
80+
path: |
81+
~/.gradle/caches
82+
~/.gradle/wrapper
83+
key: gradle-cache-jqnvfzw6w7-${{ github.run_id }}
84+
restore-keys: |
85+
gradle-cache-jqnvfzw6w7-
86+
87+
- name: tool versions
88+
continue-on-error: true
89+
run: |
90+
function run_cmd {
91+
echo "==============================================================================="
92+
echo "Running Command: $*"
93+
("$@" 2>&1) || echo "WARNING: command failed with non-zero exit code $?: $*"
94+
}
95+
96+
run_cmd uname -a
97+
run_cmd which java
98+
run_cmd java -version
99+
run_cmd which javac
100+
run_cmd javac -version
101+
run_cmd which node
102+
run_cmd node --version
103+
run_cmd ${{ env.FDC_FIREBASE_COMMAND }} --version
104+
run_cmd ./gradlew --version
105+
106+
- name: Gradle assembleDebugAndroidTest
107+
run: |
108+
set -v
109+
110+
# Speed up build times and also avoid configuring firebase-crashlytics-ndk
111+
# which is finicky integrating with the Android NDK.
112+
echo >> gradle.properties
113+
echo "org.gradle.configureondemand=true" >> gradle.properties
114+
115+
./gradlew \
116+
--profile \
117+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
118+
:firebase-dataconnect:assembleDebugAndroidTest
119+
120+
- name: Save Gradle cache
121+
uses: actions/cache/save@v4
122+
if: github.event_name == 'schedule'
123+
with:
124+
path: |
125+
~/.gradle/caches
126+
~/.gradle/wrapper
127+
key: ${{ steps.restore-gradle-cache.outputs.cache-primary-key }}
128+
129+
- name: Enable KVM group permissions for Android Emulator
130+
run: |
131+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
132+
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
133+
sudo udevadm control --reload-rules
134+
sudo udevadm trigger --name-match=kvm
135+
136+
- name: Restore AVD cache
137+
uses: actions/cache/restore@v4
138+
if: github.event_name != 'schedule'
139+
id: restore-avd-cache
140+
with:
141+
path: |
142+
~/.android/avd/*
143+
~/.android/adb*
144+
key: avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-${{ github.run_id }}
145+
restore-keys: |
146+
avd-cache-zhdsn586je-api${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}-
147+
148+
- name: Create AVD
149+
if: github.event_name == 'schedule' || steps.restore-avd-cache.outputs.cache-hit != 'true'
150+
uses: reactivecircus/android-emulator-runner@v2
151+
with:
152+
api-level: ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
153+
arch: x86_64
154+
force-avd-creation: false
155+
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
156+
disable-animations: true
157+
script: echo "Generated AVD snapshot for caching."
158+
159+
- name: Save AVD cache
160+
uses: actions/cache/save@v4
161+
if: github.event_name == 'schedule'
162+
with:
163+
path: |
164+
~/.android/avd/*
165+
~/.android/adb*
166+
key: ${{ steps.restore-avd-cache.outputs.cache-primary-key }}
167+
168+
- name: Data Connect Emulator
169+
run: |
170+
set -x
171+
172+
echo 'emulator.postgresConnectionUrl=postgresql://postgres:[email protected]:5432?sslmode=disable' > firebase-dataconnect/dataconnect.local.properties
173+
174+
./gradlew \
175+
${{ (inputs.gradleInfoLog && '--info') || '' }} \
176+
:firebase-dataconnect:connectors:runDebugDataConnectEmulator \
177+
>firebase.emulator.dataconnect.log 2>&1 &
178+
179+
- name: Firebase Auth Emulator
180+
run: |
181+
set -x
182+
cd firebase-dataconnect/emulator
183+
${{ env.FDC_FIREBASE_COMMAND }} emulators:start --only=auth >firebase.emulator.auth.log 2>&1 &
184+
185+
- name: Capture Logcat Logs
186+
run: adb logcat >logcat.log &
187+
188+
- name: Gradle connectedCheck
189+
id: connectedCheck
190+
uses: reactivecircus/android-emulator-runner@v2
191+
# Allow this GitHub Actions "job" to continue even if the tests fail so that logs from a
192+
# failed test run get uploaded as "artifacts" and are available to investigate failed runs.
193+
# A later step in this "job" will fail the job if this step fails
194+
continue-on-error: true
195+
with:
196+
api-level: ${{ env.FDC_ANDROID_EMULATOR_API_LEVEL }}
197+
arch: x86_64
198+
force-avd-creation: false
199+
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
200+
disable-animations: true
201+
script: |
202+
set -eux && ./gradlew ${{ (inputs.gradleInfoLog && '--info') || '' }} :firebase-dataconnect:connectedCheck :firebase-dataconnect:connectors:connectedCheck
203+
204+
- name: Upload log file artifacts
205+
uses: actions/upload-artifact@v4
206+
with:
207+
name: integration_test_logs
208+
path: "**/*.log"
209+
if-no-files-found: warn
210+
compression-level: 9
211+
212+
- name: Upload Gradle build report artifacts
213+
uses: actions/upload-artifact@v4
214+
with:
215+
name: integration_test_gradle_build_reports
216+
path: firebase-dataconnect/**/build/reports/
217+
if-no-files-found: warn
218+
compression-level: 9
219+
220+
- name: Verify "Gradle connectedCheck" step was successful
221+
if: steps.connectedCheck.outcome != 'success'
222+
run: |
223+
echo 'Failing because the outcome of the "Gradle connectedCheck" step ("${{ steps.connectedCheck.outcome }}") was not successful'
224+
exit 1
225+
226+
# Check this yml file with "actionlint": https://github.com/rhysd/actionlint
227+
# To run actionlint yourself, run `brew install actionlint` followed by
228+
# `actionlint .github/workflows/dataconnect.yml`
229+
actionlint-dataconnect-yml:
230+
continue-on-error: false
231+
runs-on: ubuntu-latest
232+
steps:
233+
- uses: actions/checkout@v4
234+
with:
235+
show-progress: false
236+
- uses: docker://rhysd/actionlint:1.7.7
237+
with:
238+
args: -color /github/workspace/.github/workflows/dataconnect.yml

.github/workflows/dataconnect_demo_app.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,20 @@ jobs:
8989
- name: tool versions
9090
continue-on-error: true
9191
run: |
92-
set +e -v
93-
which java
94-
java -version
95-
which javac
96-
javac -version
97-
which node
98-
node --version
99-
${{ env.FDC_FIREBASE_COMMAND }} --version
100-
./gradlew --version
92+
function run_cmd {
93+
echo "==============================================================================="
94+
echo "Running Command: $*"
95+
("$@" 2>&1) || echo "WARNING: command failed with non-zero exit code $?: $*"
96+
}
97+
98+
run_cmd which java
99+
run_cmd java -version
100+
run_cmd which javac
101+
run_cmd javac -version
102+
run_cmd which node
103+
run_cmd node --version
104+
run_cmd ${{ env.FDC_FIREBASE_COMMAND }} --version
105+
run_cmd ./gradlew --version
101106
102107
- name: ./gradlew assemble test
103108
run: |

.github/workflows/make-bom.yml

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ jobs:
1111
uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3
1212
with:
1313
python-version: '3.10'
14+
1415
- uses: actions/[email protected]
16+
1517
- name: Set up JDK 17
1618
uses: actions/[email protected]
1719
with:
@@ -21,19 +23,25 @@ jobs:
2123

2224
- name: Build
2325
run: |
24-
./ci/run.sh \
25-
--artifact-target-dir=./logs/artifacts \
26-
--artifact-patterns=bom.zip \
27-
--artifact-patterns=bomReleaseNotes.md \
28-
--artifact-patterns=recipeVersionUpdate.txt \
29-
gradle \
30-
-- \
31-
--build-cache \
32-
buildBomZip
33-
34-
- name: Upload generated artifacts
26+
./gradlew buildBomBundleZip
27+
28+
- name: Upload bom
29+
uses: actions/[email protected]
30+
with:
31+
name: bom
32+
path: build/bom/
33+
retention-days: 15
34+
35+
- name: Upload release notes
36+
uses: actions/[email protected]
37+
with:
38+
name: bom_release_notes
39+
path: build/bomReleaseNotes.md
40+
retention-days: 15
41+
42+
- name: Upload recipe version update
3543
uses: actions/[email protected]
3644
with:
37-
name: artifacts
38-
path: ./logs/artifacts/
39-
retention-days: 5
45+
name: recipe_version
46+
path: build/recipeVersionUpdate.txt
47+
retention-days: 15
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
name: Check buildSrc
1+
name: Check plugins
22

33
on:
44
pull_request:
55
paths:
6-
- 'buildSrc/**'
6+
- 'plugins/**'
77

88
concurrency:
99
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1010
cancel-in-progress: true
1111

1212
jobs:
13-
build-src-check:
13+
plugins-check:
1414
runs-on: ubuntu-22.04
1515
steps:
1616
- uses: actions/[email protected]
@@ -20,13 +20,13 @@ jobs:
2020
java-version: 17
2121
distribution: temurin
2222
cache: gradle
23-
- name: buildSrc Tests
23+
- name: plugins tests
2424
env:
2525
FIREBASE_CI: 1
2626
run: |
27-
./gradlew -b buildSrc/build.gradle.kts -PenablePluginTests=true check
27+
./gradlew plugins:check
2828
- name: Publish Test Results
2929
uses: EnricoMi/publish-unit-test-result-action@82082dac68ad6a19d980f8ce817e108b9f496c2a
3030
with:
3131
files: "**/build/test-results/**/*.xml"
32-
check_name: "buildSrc Test Results"
32+
check_name: "plugins test results"

0 commit comments

Comments
 (0)