Skip to content

Commit e99dd50

Browse files
authored
Merge branch 'main' into fie-quota-retry
2 parents a1857e0 + 4db5dc8 commit e99dd50

File tree

108 files changed

+1493
-428
lines changed

Some content is hidden

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

108 files changed

+1493
-428
lines changed

.github/workflows/ci_tests.yml

Lines changed: 7 additions & 113 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ jobs:
6464
./gradlew :common:updateVersion common:publishToMavenLocal
6565
cd ..
6666
67+
- name: Clone mock responses
68+
if: matrix.module == ':firebase-vertexai'
69+
run: |
70+
firebase-vertexai/update_responses.sh
71+
6772
- name: Add google-services.json
6873
env:
6974
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
@@ -112,6 +117,8 @@ jobs:
112117
fail-fast: false
113118
matrix:
114119
module: ${{ fromJSON(needs.determine_changed.outputs.modules) }}
120+
exclude:
121+
- module: :firebase-firestore
115122

116123
steps:
117124
- uses: actions/[email protected]
@@ -144,119 +151,6 @@ jobs:
144151
run: |
145152
./gradlew ${{matrix.module}}:deviceCheck withErrorProne -PtargetBackend="prod"
146153
147-
firestore_custom_integ_tests:
148-
name: "Firestore Custom Instrumentation Tests Against Named DB"
149-
runs-on: ubuntu-22.04
150-
needs:
151-
- determine_changed
152-
# only run on post submit or PRs not originating from forks.
153-
if: ((github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && contains(fromJSON(needs.determine_changed.outputs.modules), ':firebase-firestore')
154-
strategy:
155-
fail-fast: false
156-
157-
steps:
158-
- uses: actions/[email protected]
159-
with:
160-
fetch-depth: 2
161-
submodules: true
162-
163-
- name: Set up JDK 17
164-
uses: actions/[email protected]
165-
with:
166-
java-version: 17
167-
distribution: temurin
168-
cache: gradle
169-
170-
- name: Add google-services.json
171-
env:
172-
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.INTEG_TESTS_GOOGLE_SERVICES }}
173-
run: |
174-
echo $INTEG_TESTS_GOOGLE_SERVICES | base64 -d > google-services.json
175-
- uses: google-github-actions/auth@v2
176-
with:
177-
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
178-
- uses: google-github-actions/setup-gcloud@v2
179-
180-
# create composite indexes with Terraform
181-
- name: Setup Terraform
182-
uses: hashicorp/setup-terraform@v2
183-
- name: Terraform Init
184-
run: |
185-
cd firebase-firestore
186-
terraform init
187-
continue-on-error: true
188-
- name: Terraform Apply
189-
if: github.event_name == 'pull_request'
190-
run: |
191-
cd firebase-firestore
192-
193-
# Define a temporary file, redirect both stdout and stderr to the file
194-
output_file=$(mktemp)
195-
if ! terraform apply -var-file=../google-services.json -auto-approve > "$output_file" 2>&1 ; then
196-
cat "$output_file"
197-
if cat "$output_file" | grep -q "index already exists"; then
198-
echo "==================================================================================="
199-
echo -e "\e[93m\e[1mTerraform apply failed due to index already exists; We can safely ignore this error.\e[0m"
200-
echo "==================================================================================="
201-
fi
202-
exit 1
203-
fi
204-
rm -f "$output_file"
205-
continue-on-error: true
206-
207-
- name: Firestore Named DB Integ Tests
208-
env:
209-
FIREBASE_CI: 1
210-
FTL_RESULTS_BUCKET: android-ci
211-
FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}}
212-
FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }}
213-
run: |
214-
./gradlew firebase-firestore:deviceCheck withErrorProne -PtargetBackend="prod" -PtargetDatabaseId="test-db"
215-
216-
217-
firestore_nightly_integ_tests:
218-
name: "Firestore Instrumentation Tests Against Nightly Environment"
219-
runs-on: ubuntu-22.04
220-
needs:
221-
- determine_changed
222-
# only run on post submit or PRs not originating from forks.
223-
if: ((github.repository == 'Firebase/firebase-android-sdk' && github.event_name == 'push') || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)) && contains(fromJSON(needs.determine_changed.outputs.modules), ':firebase-firestore')
224-
strategy:
225-
fail-fast: false
226-
227-
steps:
228-
- uses: actions/[email protected]
229-
with:
230-
fetch-depth: 2
231-
submodules: true
232-
233-
- name: Set up JDK 17
234-
uses: actions/[email protected]
235-
with:
236-
java-version: 17
237-
distribution: temurin
238-
cache: gradle
239-
240-
- name: Add google-services.json
241-
env:
242-
INTEG_TESTS_GOOGLE_SERVICES: ${{ secrets.NIGHTLY_INTEG_TESTS_GOOGLE_SERVICES }}
243-
run: |
244-
echo $INTEG_TESTS_GOOGLE_SERVICES > google-services.json
245-
- uses: google-github-actions/auth@v2
246-
with:
247-
credentials_json: ${{ secrets.GCP_SERVICE_ACCOUNT }}
248-
- uses: google-github-actions/setup-gcloud@v2
249-
250-
- name: Firestore Nightly Integ Tests
251-
env:
252-
FIREBASE_CI: 1
253-
FTL_RESULTS_BUCKET: android-ci
254-
FTL_RESULTS_DIR: ${{ github.event_name == 'pull_request' && format('pr-logs/pull/{0}/{1}/{2}/{3}_{4}/artifacts/', github.repository, github.event.pull_request.number, github.job, github.run_id, github.run_attempt) || format('logs/{0}/{1}_{2}/artifacts/', github.workflow, github.run_id, github.run_attempt)}}
255-
FIREBASE_APP_CHECK_DEBUG_SECRET: ${{ secrets.FIREBASE_APP_CHECK_DEBUG_SECRET }}
256-
run: |
257-
./gradlew firebase-firestore:deviceCheck withErrorProne -PtargetBackend="nightly"
258-
259-
260154
publish-test-results:
261155
name: "Publish Tests Results"
262156
needs:

0 commit comments

Comments
 (0)