Skip to content

Commit 5ebe756

Browse files
committed
Merge branch 'main' into firestore-change-headers
2 parents 15c6f8a + 7de4a72 commit 5ebe756

File tree

5,608 files changed

+565851
-40480
lines changed

Some content is hidden

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

5,608 files changed

+565851
-40480
lines changed

.github/run-package-tests.sh

Lines changed: 41 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16+
set -e
17+
1618
DIRS=$(find * -maxdepth 0 -type d -name '[A-Z]*')
1719
PREFER_LOWEST=""
1820
if [ "$#" -eq 1 ]; then
@@ -42,45 +44,57 @@ fi
4244
export COMPOSER=composer-local.json
4345

4446
FAILED_FILE=$(mktemp -d)/failed
45-
for DIR in ${DIRS}; do {
46-
cp ${DIR}/composer.json ${DIR}/composer-local.json
47+
for DIR in ${DIRS}; do
48+
echo "--- Processing ${DIR} ---"
49+
cp "${DIR}/composer.json" "${DIR}/composer-local.json"
4750
# Update composer to use local packages
48-
for i in CommonProtos,common-protos,4.100 BigQuery,cloud-bigquery Core,cloud-core Logging,cloud-logging PubSub,cloud-pubsub Storage,cloud-storage ShoppingCommonProtos,shopping-common-protos GeoCommonProtos,geo-common-protos,0.1; do
49-
IFS=","; set -- $i;
50-
if grep -q "\"google/$2\":" ${DIR}/composer.json; then
51+
PACKAGE_DEPENDENCIES=(
52+
"CommonProtos,common-protos,4.100"
53+
"BigQuery,cloud-bigquery"
54+
"Core,cloud-core"
55+
"Logging,cloud-logging"
56+
"PubSub,cloud-pubsub"
57+
"Storage,cloud-storage"
58+
"ShoppingCommonProtos,shopping-common-protos"
59+
"GeoCommonProtos,geo-common-protos,0.1"
60+
)
61+
for i in "${PACKAGE_DEPENDENCIES[@]}"; do
62+
IFS="," read -r PKG_DIR PKG_NAME PKG_VERSION <<< "$i"
63+
if grep -q "\"google/${PKG_NAME}\":" "${DIR}/composer.json"; then
5164
# determine local package version
52-
if [ "$STRICT" = "true" ]; then VERSION=$(cat $1/VERSION); elif [ -z "$3" ]; then VERSION="1.100"; else VERSION=$3; fi
53-
echo "Use local package $1 as google/$2:$VERSION in $DIR"
65+
if [ "${STRICT}" = "true" ]; then
66+
VERSION=$(cat "${PKG_DIR}/VERSION")
67+
elif [ -z "${PKG_VERSION}" ]; then
68+
VERSION="1.100"
69+
else
70+
VERSION=${PKG_VERSION}
71+
fi
72+
echo "Use local package ${PKG_DIR} as google/${PKG_NAME}:${VERSION} in ${DIR}"
5473
# "canonical: false" ensures composer will try to install from packagist when the "--prefer-lowest" flag is set.
55-
composer config repositories.$2 -d ${DIR} "{\"type\": \"path\", \"url\": \"../$1\", \"options\":{\"versions\":{\"google/$2\":\"$VERSION\"}},\"canonical\":false}"
74+
JSON_CONFIG=$(printf '{"type":"path","url":"../%s","options":{"versions":{"google/%s":"%s"}},"canonical":false}' "${PKG_DIR}" "${PKG_NAME}" "${VERSION}")
75+
composer config "repositories.${PKG_NAME}" -d "${DIR}" "${JSON_CONFIG}"
5676
fi
5777
done
5878

59-
echo -n "Installing composer in $DIR"
60-
if [ "$PREFER_LOWEST" != "" ]; then
61-
echo -n " (with $PREFER_LOWEST)"
79+
echo -n "Installing composer in ${DIR}"
80+
if [ -n "${PREFER_LOWEST}" ]; then
81+
echo -n " (with ${PREFER_LOWEST})"
6282
fi
6383
echo ""
64-
composer -q --no-interaction --no-ansi --no-progress $PREFER_LOWEST update -d ${DIR};
65-
if [ $? != 0 ]; then
66-
echo "$DIR: composer install failed" >> "${FAILED_FILE}"
84+
composer -q --no-interaction --no-ansi --no-progress ${PREFER_LOWEST} update -d "${DIR}" || {
85+
echo "${DIR}: composer install failed" >> "${FAILED_FILE}"
6786
# run again but without "-q" so we can see the error
68-
composer --no-interaction --no-ansi --no-progress $PREFER_LOWEST update -d ${DIR};
87+
composer --no-interaction --no-ansi --no-progress ${PREFER_LOWEST} update -d "${DIR}"
6988
continue
70-
fi
71-
echo "Running $DIR Unit Tests"
72-
${DIR}/vendor/bin/phpunit -c ${DIR}/phpunit.xml.dist;
73-
if [ $? != 0 ]; then
74-
echo "$DIR: failed" >> "${FAILED_FILE}"
75-
fi
89+
}
90+
echo "Running ${DIR} Unit Tests"
91+
"${DIR}/vendor/bin/phpunit" -c "${DIR}/phpunit.xml.dist" || echo "${DIR}: failed" >> "${FAILED_FILE}"
92+
7693
if [ -f "${DIR}/phpunit-snippets.xml.dist" ]; then
77-
echo "Running $DIR Snippet Tests"
78-
${DIR}/vendor/bin/phpunit -c ${DIR}/phpunit-snippets.xml.dist;
79-
if [ $? != 0 ]; then
80-
echo "$DIR (snippets): failed" >> "${FAILED_FILE}"
81-
fi
94+
echo "Running ${DIR} Snippet Tests"
95+
"${DIR}/vendor/bin/phpunit" -c "${DIR}/phpunit-snippets.xml.dist" || echo "${DIR} (snippets): failed" >> "${FAILED_FILE}"
8296
fi
83-
}; done
97+
done
8498

8599
if [ -f "${FAILED_FILE}" ]; then
86100
echo "--------- Failed tests --------------"

.github/workflows/backwards-compatibility-checks.yaml

Lines changed: 0 additions & 126 deletions
This file was deleted.

.github/workflows/conformance-tests-bigtable-emulator.yaml

Lines changed: 0 additions & 58 deletions
This file was deleted.
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# Copyright 2025 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
# Github action job to test core java library features on
15+
# downstream client libraries before they are released.
16+
on:
17+
push:
18+
branches:
19+
- main
20+
paths:
21+
- 'Bigtable/**'
22+
- '.github/workflows/conformance-tests-bigtable-proxy.yaml'
23+
pull_request:
24+
paths:
25+
- 'Bigtable/**'
26+
- '.github/workflows/conformance-tests-bigtable-proxy.yaml'
27+
workflow_dispatch:
28+
name: Run Bigtable Conformance Tests With Proxy
29+
jobs:
30+
conformance:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- name: Checkout code
34+
uses: actions/checkout@v5
35+
36+
- name: Setup PHP
37+
uses: shivammathur/setup-php@v2
38+
with:
39+
php-version: '8.1'
40+
extensions: grpc
41+
42+
- name: Checkout Bigtable conformance tests
43+
uses: actions/checkout@v5
44+
with:
45+
repository: googleapis/cloud-bigtable-clients-test
46+
ref: v0.0.3
47+
path: cloud-bigtable-clients-test
48+
49+
- uses: actions/setup-go@v5
50+
with:
51+
go-version: '>=1.20.2'
52+
53+
- name: Install Road Runner PHP
54+
run: |
55+
wget https://github.com/roadrunner-server/roadrunner/releases/download/v2024.3.1/roadrunner-2024.3.1-linux-amd64.deb
56+
sudo dpkg -i roadrunner-2024.3.1-linux-amd64.deb
57+
58+
- run: bash Bigtable/tests/Conformance/proxy/conformance.sh

.github/workflows/conformance-tests-storage-emulator.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ jobs:
1616

1717
services:
1818
emulator:
19-
image: gcr.io/cloud-devrel-public-resources/storage-testbench:v0.53.0
19+
image: gcr.io/cloud-devrel-public-resources/storage-testbench:v0.55.0
2020
ports:
2121
- 9000:9000
2222

2323
steps:
2424
- name: Checkout code
25-
uses: actions/checkout@v4
25+
uses: actions/checkout@v5
2626

2727
- name: Setup PHP
2828
uses: shivammathur/setup-php@v2

.github/workflows/docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
env:
1313
PHPDOC_ENV: prod
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
- name: Setup Python
1717
uses: actions/setup-python@v5
1818
with:

0 commit comments

Comments
 (0)