Integration tests #1376
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: Integration tests | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| schedule: | |
| - cron: "0 */6 * * *" | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php-version: | |
| - 8.1 | |
| #- 8.2 | |
| env: | |
| extensions: grpc, protobuf | |
| key: cache-v1 # can be any string, change to clear the extension cache. | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup cache environment | |
| id: extcache | |
| uses: shivammathur/cache-extensions@v1 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: ${{ env.extensions }} | |
| key: ${{ env.key }} | |
| - name: Cache extensions | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ steps.extcache.outputs.dir }} | |
| key: ${{ steps.extcache.outputs.key }} | |
| restore-keys: ${{ steps.extcache.outputs.key }} | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| tools: pecl | |
| extensions: ${{ env.extensions }} | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php- | |
| - name: Install dependencies | |
| if: steps.composer-cache.outputs.cache-hit != 'true' | |
| uses: php-actions/composer@v6 | |
| with: | |
| ssh_key: ${{ secrets.ssh_key }} | |
| ssh_key_pub: ${{ secrets.ssh_key_pub }} | |
| args: --profile --ignore-platform-reqs | |
| - run: | | |
| echo '${{ secrets.CBWS_CREDENTIALS_CONTENTS }}' > credentials.json | |
| echo "CBWS_CREDENTIALS=credentials.json" >> "$GITHUB_ENV" | |
| - name: Run test suite | |
| run: composer run-script test-integration |