Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(tests): add CI for checking lowest version of dependencies #6899

Merged
merged 23 commits into from
Jan 22, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2b206d5
chore(tests): add CI for checking lowest version of dependencies
bshaffer Dec 18, 2023
7801ffa
update dev deps
bshaffer Dec 18, 2023
e632142
update all packages for tests to pass
bshaffer Dec 18, 2023
536fa1d
run lowest dependency tests on lowest version of PHP
bshaffer Dec 18, 2023
c8ebc75
fix language
bshaffer Dec 18, 2023
9023d4e
Merge branch 'main' into add-prefer-lowest-package-tests
bshaffer Jan 5, 2024
cfdcc3a
chore: add Longrunning version to composer.json
bshaffer Jan 5, 2024
20df777
we no longer need COMPOSER_ROOT_VERSION
bshaffer Jan 5, 2024
7edfbda
remove common protos dep
bshaffer Jan 5, 2024
e07a9c6
define minimum common-protos dep
bshaffer Jan 5, 2024
a82edd8
fix usage/comment
bshaffer Jan 5, 2024
e245eee
Merge branch 'main' into add-prefer-lowest-package-tests
bshaffer Jan 5, 2024
4f37dfe
Update Channel/composer.json
bshaffer Jan 5, 2024
1037149
do NOT use local packagess for --prefer-lowest
bshaffer Jan 8, 2024
ce3372c
fix deps for lowest
bshaffer Jan 9, 2024
8f3cdae
allow psr/log v1
bshaffer Jan 9, 2024
49384b8
Merge branch 'main' into add-prefer-lowest-package-tests
bshaffer Jan 18, 2024
ce10711
fix config deps
bshaffer Jan 18, 2024
b1e7c1e
Merge branch 'add-prefer-lowest-package-tests' of github.com:googleap…
bshaffer Jan 18, 2024
43af413
upgrade minimum cloud-common-protos version
bshaffer Jan 18, 2024
8a8f555
Merge branch 'main' into add-prefer-lowest-package-tests
bshaffer Jan 19, 2024
ab0b7b1
Merge branch 'main' into add-prefer-lowest-package-tests
bshaffer Jan 20, 2024
6c88a2f
add vmware common protos
bshaffer Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 23 additions & 5 deletions .github/run-package-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,27 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# first argument can be a directory
DIRS=$(find * -maxdepth 0 -type d -name '[A-Z]*')
PREFER_LOWEST=""
VALID=1
if [ "$#" -eq 1 ]; then
DIRS=$1
# first argument can be a directory or "--prefer-lowest"
if [ "$1" = "--prefer-lowest" ]; then
PREFER_LOWEST="--prefer-lowest"
else
DIRS=$1
fi
elif [ "$#" -eq 2 ]; then
# first argument is a directory, second is "--prefer-lowest"
if [ "$2" = "--prefer-lowest" ]; then
DIRS=$1
PREFER_LOWEST="--prefer-lowest"
else
echo "usage: run-package-tests.sh [DIR] [--prefer-lowest]"
exit 1;
fi
elif [ "$#" -ne 0 ]; then
echo "usage: run-package-tests.sh [DIR]"
echo "usage: run-package-tests.sh [DIR] [--prefer-lowest]"
exit 1;
fi

Expand All @@ -38,11 +53,14 @@ for DIR in ${DIRS}; do {
done

echo "Installing composer in $DIR"
composer -q --no-interaction --no-ansi --no-progress update -d ${DIR};
if [ "$PREFER_LOWEST" != "" ]; then
echo " (with $PREFER_LOWEST)"
fi
composer -q --no-interaction --no-ansi --no-progress $PREFER_LOWEST update -d ${DIR};
if [ $? != 0 ]; then
echo "$DIR: composer install failed" >> "${FAILED_FILE}"
# run again but without "-q" so we can see the error
composer --no-interaction --no-ansi --no-progress update -d ${DIR};
composer --no-interaction --no-ansi --no-progress $PREFER_LOWEST update -d ${DIR};
continue
fi
echo "Running $DIR Unit Tests"
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,19 @@ jobs:
- name: Run Package Test Suites
run: bash .github/run-package-tests.sh

test_packages_lowest:
name: Package Tests (Lowest Dependencies)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@verbose
with:
php-version: '7.4'
extensions: grpc
- name: Run Package Test Suites
run: bash .github/run-package-tests.sh --prefer-lowest

test_dev_commands:
name: Dev Commands Unit Tests
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion BigQuery/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/cloud-storage": "^1.3"
},
Expand Down
3 changes: 2 additions & 1 deletion Bigtable/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"require-dev": {
"phpunit/phpunit": "^9.0",
"erusev/parsedown": "^1.6",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"phpspec/prophecy-phpunit": "^2.0"
},
"suggest": {
Expand Down
3 changes: 2 additions & 1 deletion Channel/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"google/common-protos": "^3.2||^4.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
"phpunit/phpunit": "^9.0",
"google/common-protos": "^3.2||^4.0"
bshaffer marked this conversation as resolved.
Show resolved Hide resolved
},
"suggest": {
"ext-grpc": "Enables use of gRPC, a universal high-performance RPC framework created by Google.",
Expand Down
3 changes: 2 additions & 1 deletion Core/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/gax": "^1.26.0",
"opis/closure": "^3",
Expand Down
3 changes: 2 additions & 1 deletion Datastore/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6"
},
"extra": {
Expand Down
3 changes: 2 additions & 1 deletion Debugger/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/cloud-tools": "^0.13.0",
"kreait/firebase-php": "^5.26.5"
Expand Down
3 changes: 2 additions & 1 deletion Firestore/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6"
},
"suggest": {
Expand Down
3 changes: 2 additions & 1 deletion Language/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/cloud-storage": "^1.3"
},
Expand Down
6 changes: 4 additions & 2 deletions Logging/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"fig/log-test": "^1.0",
"google/cloud-storage": "^1.3",
"google/cloud-bigquery": "^1.0",
"google/cloud-pubsub": "^1.0",
"opis/closure": "^3"
"opis/closure": "^3",
"monolog/monolog": "^2.9|3.0"
},
"provide": {
"psr/log-implementation": "1.0|2.0"
Expand Down
3 changes: 2 additions & 1 deletion PubSub/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"flix-tech/avro-php": "^5.0.0"
},
Expand Down
3 changes: 2 additions & 1 deletion Spanner/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/cloud-pubsub": "^1.0"
},
Expand Down
3 changes: 2 additions & 1 deletion Speech/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/cloud-storage": "^1.3"
},
Expand Down
3 changes: 2 additions & 1 deletion Storage/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"phpseclib/phpseclib": "^2.0||^3.0",
"google/cloud-pubsub": "^1.0"
Expand Down
3 changes: 2 additions & 1 deletion Trace/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6"
},
"suggest": {
Expand Down
3 changes: 2 additions & 1 deletion Translate/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6"
},
"suggest": {
Expand Down
3 changes: 2 additions & 1 deletion Vision/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"phpunit/phpunit": "^9.0",
"phpspec/prophecy-phpunit": "^2.0",
"squizlabs/php_codesniffer": "2.*",
"phpdocumentor/reflection": "^5.0",
"phpdocumentor/reflection": "^5.3.3",
"phpdocumentor/reflection-docblock": "^5.3",
"erusev/parsedown": "^1.6",
"google/cloud-storage": "^1.12"
},
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@
"google/auth": "^1.34.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^9.6",
"phpdocumentor/reflection": "^5.0",
"erusev/parsedown": "^1.6",
"phpseclib/phpseclib": "^3.0",
"google/cloud-tools": "^0.13.0",
"opis/closure": "^3.0",
"flix-tech/avro-php": "^5.0.0",
"phpspec/prophecy-phpunit": "^2.0",
"kreait/firebase-php": "^5.26.5"
"phpspec/prophecy-phpunit": "^2.1",
"kreait/firebase-php": "^5.26.5",
"psr/log": "^1.1.1 || 2.0"
},
"conflict": {
"psr/log": ">=3"
Expand Down
Loading