Repository navigation
feat(Gax)!: add strict_types and native typehints for V2 #11294
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Suite | |
| on: | |
| release: | |
| types: [published] | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| platform: [ubuntu-latest, windows-latest] | |
| php: [ "8.2", "8.3", "8.4", "8.5" ] | |
| extensions: ["grpc"] | |
| variant: [""] | |
| include: | |
| - platform: "ubuntu-latest" | |
| php: "8.2" | |
| extensions: "protobuf,grpc" | |
| variant: " + protobuf ext" | |
| - platform: "ubuntu-latest" | |
| php: "8.2" | |
| extensions: "" | |
| variant: " (no gRPC)" | |
| name: "Unit Tests: PHP ${{ matrix.php }}${{ matrix.variant }} (${{ matrix.platform }})" | |
| runs-on: ${{ matrix.platform }} | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup cache environment | |
| id: extcache | |
| uses: shivammathur/cache-extensions@695b1b465eba861efe67cbbc31252c27f5ed253d # 1.15.11 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: sodium, sysvshm, gmp, ${{ matrix.extensions }} | |
| key: cache-key-1 # increment to bust the cache | |
| - name: Cache extensions | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| with: | |
| path: ${{ steps.extcache.outputs.dir }} | |
| key: ${{ steps.extcache.outputs.key }} | |
| restore-keys: ${{ steps.extcache.outputs.key }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: sodium, sysvshm, gmp, ${{ matrix.extensions }} | |
| - name: Install Dependencies | |
| uses: nick-invision/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 | |
| with: | |
| timeout_minutes: 10 | |
| max_attempts: 3 | |
| command: composer --no-interaction --no-ansi --no-progress update | |
| - name: Run Unit Test Suite ${{ matrix.platform != 'windows-latest' || '(Windows)' }} | |
| env: | |
| ZEND_DONT_UNLOAD_MODULES: 1 | |
| run: | | |
| vendor/bin/phpunit -c phpunit.xml.dist | |
| - if: ${{ matrix.platform != 'windows-latest' && matrix.php != '8.5' }} | |
| name: Run Snippet Test Suite | |
| run: | | |
| vendor/bin/phpunit -c phpunit-snippets.xml.dist --verbose | |
| test_packages: | |
| name: "Unit Tests: Packages" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 | |
| with: | |
| php-version: '8.2' | |
| extensions: grpc | |
| - name: Run Package Test Suites | |
| run: bash .github/run-package-tests.sh | |
| test_packages_lowest: | |
| name: "Unit Tests: Packages (Lowest Dependencies)" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 | |
| with: | |
| php-version: '8.2' | |
| extensions: grpc | |
| - name: Run Package Test Suites | |
| env: | |
| PREFER_LOWEST: ${{ (github.event.pull_request.user.login == 'release-please[bot]' || github.event_name == 'release') && '--prefer-lowest-strict' || '--prefer-lowest' }} | |
| run: bash .github/run-package-tests.sh $PREFER_LOWEST | |
| test_dev_commands: | |
| name: "Unit Tests: Dev Commands" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # 2.40.0 | |
| with: | |
| php-version: "8.2" | |
| - name: "Install dependencies" | |
| run: composer --no-interaction --no-ansi --no-progress update -d dev | |
| - name: Run Dev Unit Test Suite | |
| run: dev/vendor/bin/phpunit -c dev/phpunit.xml.dist | |
| - name: Run Dev Snippet Test Suite | |
| run: dev/vendor/bin/phpunit -c dev/phpunit-snippets.xml.dist |