Skip to content

chore(main): release 0.344.0 #1318

chore(main): release 0.344.0

chore(main): release 0.344.0 #1318

on:
push:
branches:
- main
paths:
- 'Spanner/**'
- '.github/workflows/emulator-system-tests-spanner.yaml'
pull_request:
paths:
- 'Spanner/**'
- '.github/workflows/emulator-system-tests-spanner.yaml'
name: Emulator System Tests
permissions:
contents: read
jobs:
test:
name: Spanner
runs-on: 'ubuntu-24.04'
services:
emulator:
image: gcr.io/cloud-spanner-emulator/emulator:1.5.56@sha256:18a56fd557011e50e1733a9232e8d17ec9bdd7e51f6cf7660f14c234479f4f36
ports:
- 9010:9010
- 9020:9020
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false
- name: Create Spanner instance
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3
with:
version: '516.0.0'
- run: gcloud info
- run: gcloud config configurations create emulator
- run: gcloud config set auth/disable_credentials true
- run: gcloud config set project emulator-project
- run: gcloud config set api_endpoint_overrides/spanner http://localhost:9020/
- run: gcloud spanner instances create google-cloud-php-system-tests --config=emulator-config --description="Test Instance" --nodes=1
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
with:
php-version: '8.4'
ini-values: grpc.enable_fork_support=1
tools: pecl
extensions: bcmath, grpc, pcntl
- name: Install dependencies
run: |
# ensure composer uses local Core instead of pulling from packagist
composer config repositories.local --json '{"type":"path", "url": "../Core", "options": {"versions": {"google/cloud-core": "1.100"}},"canonical":false}' -d Spanner
composer update --prefer-dist --no-interaction --no-suggest -d Spanner/
- name: Run system tests
run: |
Spanner/vendor/bin/phpunit -c Spanner/phpunit-system.xml.dist
env:
SPANNER_EMULATOR_HOST: localhost:9010
GOOGLE_CLOUD_PHP_TESTS_KEY_PATH: '.github/emulator/example-key.json'
GOOGLE_CLOUD_PHP_WHITELIST_TESTS_KEY_PATH: '.github/emulator/example-key.json'