Skip to content
Open
Changes from all commits
Commits
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
86 changes: 57 additions & 29 deletions .github/workflows/conformance-tests-gax-showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,60 @@
permissions:
contents: read
jobs:
gapic-showcase:
runs-on: ubuntu-latest
env:
GAPIC_SHOWCASE_VERSION: 0.42.0
OS: linux
ARCH: amd64
name: GAPIC Showcase Conformance Tests
steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: grpc-1.83.0

- name: Install and run GAPIC Showcase
run: |
curl -L https://github.com/googleapis/gapic-showcase/releases/download/v${GAPIC_SHOWCASE_VERSION}/gapic-showcase-${GAPIC_SHOWCASE_VERSION}-${OS}-${ARCH}.tar.gz | tar -zx
./gapic-showcase run --port :7469 --tls --ca-cert-output-file Gax/tests/Conformance/showcase.pem &
sleep 2

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-suggest -d Gax/

- name: Run PHPUnit
run: Gax/vendor/bin/phpunit -c Gax/phpunit-conformance.xml.dist
gapic-showcase:
name: GAPIC Showcase Conformance Tests
runs-on: ubuntu-latest
env:
GAPIC_SHOWCASE_VERSION: 0.42.0
OS: linux
ARCH: amd64
steps:
- name: Checkout code
uses: actions/checkout@v7

Check failure on line 19 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 19 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

conformance-tests-gax-showcase.yaml:19: unpinned action reference: action is not pinned to a hash (required by blanket policy)

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

Check failure on line 22 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 22 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

conformance-tests-gax-showcase.yaml:22: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
php-version: '8.2'

- name: Get PHP Extension Directory
id: php-info
run: |
echo "ext_dir=$(php-config --extension-dir)" >> $GITHUB_OUTPUT
ini_dir=$(php --ini | grep "Scan this dir" | cut -d: -f2 | xargs)
if [ -z "$ini_dir" ]; then ini_dir="/etc/php/8.2/cli/conf.d"; fi
echo "ini_dir=$ini_dir" >> $GITHUB_OUTPUT

- name: Cache gRPC Extension
id: cache-grpc
uses: actions/cache@v4

Check failure on line 36 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/unpinned-uses

unpinned action reference: action is not pinned to a hash (required by blanket policy)

Check failure on line 36 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

unpinned-uses

conformance-tests-gax-showcase.yaml:36: unpinned action reference: action is not pinned to a hash (required by blanket policy)
with:
path: ~/.cache/grpc.so
key: grpc-1.83.0-php8.2-v3

- name: Install gRPC Extension
if: steps.cache-grpc.outputs.cache-hit != 'true'
run: |
sudo MAKEFLAGS="-j$(nproc)" pecl install grpc-1.83.0
mkdir -p ~/.cache
cp ${{ steps.php-info.outputs.ext_dir }}/grpc.so ~/.cache/grpc.so

Check failure on line 46 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code

- name: Enable gRPC Extension
run: |
sudo cp ~/.cache/grpc.so ${{ steps.php-info.outputs.ext_dir }}/grpc.so

Check failure on line 50 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
echo "extension=grpc.so" | sudo tee ${{ steps.php-info.outputs.ini_dir }}/20-grpc.ini

Check failure on line 51 in .github/workflows/conformance-tests-gax-showcase.yaml

View workflow job for this annotation

GitHub Actions / zizmor-output

zizmor/template-injection

code injection via template expansion: may expand into attacker-controllable code
php -m | grep grpc

- name: Install and run GAPIC Showcase
run: |
curl -L https://github.com/googleapis/gapic-showcase/releases/download/v${GAPIC_SHOWCASE_VERSION}/gapic-showcase-${GAPIC_SHOWCASE_VERSION}-${OS}-${ARCH}.tar.gz | tar -zx
./gapic-showcase run --port :7469 --tls --ca-cert-output-file Gax/tests/Conformance/showcase.pem &
sleep 2

- name: Install dependencies
run: |
composer update --prefer-dist --no-interaction --no-suggest -d Gax/

- name: Run PHPUnit
run: Gax/vendor/bin/phpunit -c Gax/phpunit-conformance.xml.dist

Loading