Skip to content

Commit c0309c9

Browse files
committed
Handle missing gRPC extension in workflow
1 parent b6ed7fc commit c0309c9

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

.github/workflows/grpc-tests.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,17 @@ jobs:
7575
- name: Setup problem matchers for PHP
7676
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
7777

78+
- name: Detect gRPC extension
79+
id: grpc
80+
run: |
81+
if php -m | grep -qi '^grpc$'; then
82+
echo "grpc_present=true" >> "$GITHUB_OUTPUT"
83+
else
84+
echo "grpc_present=false" >> "$GITHUB_OUTPUT"
85+
echo "COMPOSER_IGNORE_PLATFORM_REQ=ext-grpc" >> "$GITHUB_ENV"
86+
echo "gRPC extension not available; allowing Composer to proceed without ext-grpc."
87+
fi
88+
7889
- uses: "ramsey/composer-install@v3"
7990

8091
- name: Setup Problem Matchers for PHPUnit

0 commit comments

Comments
 (0)