Skip to content

feat(tests): use a single container with multiple php versions #1394

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

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
2 changes: 1 addition & 1 deletion .kokoro/php73.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/php73"
value: "gcr.io/cloud-devrel-kokoro-resources/php-multi-test"
}

# Give the docker image a unique project ID and credentials per PHP version
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/php74.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/php74"
value: "gcr.io/cloud-devrel-kokoro-resources/php-multi-test"
}

# Give the docker image a unique project ID and credentials per PHP version
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/php80.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/php80"
value: "gcr.io/cloud-devrel-kokoro-resources/php-multi-test"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I cannot find it here: https://github.com/googleapis/testing-infra-docker/blob/main/php/php80/Dockerfile

Is it located somewhere else?

}

# Give the docker image a unique project ID and credentials per PHP version
Expand Down
15 changes: 13 additions & 2 deletions .kokoro/system_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,21 @@ mkdir -p build/logs

export PULL_REQUEST_NUMBER=$KOKORO_GITHUB_PULL_REQUEST_NUMBER

# decide which php version to use (this is for TESTING ONLY)
if [ "3" -eq ${GOOGLE_ALT_PROJECT_ID: -1} ]; then
phpbrew switch "7.3.28"
elif [ "1" -eq ${GOOGLE_ALT_PROJECT_ID: -1} ]; then
phpbrew switch "7.4.20"
elif [ "2" -eq ${GOOGLE_ALT_PROJECT_ID: -1} ]; then
phpbrew switch "8.0.7"
else
# By default use PHP 7.4
phpbrew switch "7.4.20"
fi

# If we are running REST tests, disable gRPC
if [ "${RUN_REST_TESTS_ONLY}" = "true" ]; then
GRPC_INI=$(php -i | grep grpc.ini | sed 's/^Additional .ini files parsed => //g' | sed 's/,*$//g' )
mv $GRPC_INI "${GRPC_INI}.disabled"
phpbrew ext disable grpc
fi

# Install global test dependencies
Expand Down