Skip to content

Commit

Permalink
Debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc45 committed Mar 1, 2024
1 parent 321c9d6 commit 41322e9
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/qit-environment-test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,14 +114,17 @@ jobs:
run: |
expected_major_minor="${{ matrix.php }}"
# Create the PHP script within the Docker environment
php qit-cli.php env:exec "echo '<?php echo PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION; ?>' > /tmp/temp_version_check.php"
# Print the PHP script
php qit-cli.php env:exec "cat /tmp/temp_version_check.php"
# Execute the PHP script
actual_major_minor=$(php qit-cli.php env:exec "php /tmp/temp_version_check.php")
# Get the PHP Docker image name dynamically
docker_image=$(php qit env:list --field=docker_images | grep php)
# Check if the Docker image name was found
if [ -z "$docker_image" ]; then
echo "No PHP Docker image found"
exit 1
fi
# Execute PHP version check using the Docker image
actual_major_minor=$(docker run --rm "$docker_image" php -r 'echo PHP_MAJOR_VERSION . "." . PHP_MINOR_VERSION;')
if [[ "$actual_major_minor" == "$expected_major_minor" ]]; then
echo "PHP Major.Minor version is as expected: $actual_major_minor"
Expand Down

0 comments on commit 41322e9

Please sign in to comment.