Fix openAI integration by making responseModalities only for Gemini #25
Workflow file for this run
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: Testing | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| workflow_dispatch: | |
| workflow_call: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| behat: | |
| name: Functional / PHP ${{ matrix.php }} | |
| strategy: | |
| matrix: | |
| php: ['8.2'] | |
| runs-on: ubuntu-latest | |
| services: | |
| mysql: | |
| image: mysql:8 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_DATABASE: wp_cli_test | |
| MYSQL_USER: wp_cli_test | |
| MYSQL_PASSWORD: password1 | |
| MYSQL_HOST: 127.0.0.1 | |
| ports: | |
| - 3306 | |
| options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=2s --health-retries=3 | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| tools: composer | |
| - name: Install composer packages | |
| run: composer install | |
| - name: Run Behat | |
| run: composer behat | |
| env: | |
| WP_CLI_TEST_DBUSER: wp_cli_test | |
| WP_CLI_TEST_DBPASS: password1 | |
| WP_CLI_TEST_DBNAME: wp_cli_test | |
| WP_CLI_TEST_DBHOST: 127.0.0.1:${{ job.services.mysql.ports[3306] }} | |
| unit: #----------------------------------------------------------------------- | |
| name: Unit test / PHP ${{ matrix.php }} | |
| strategy: | |
| matrix: | |
| php: [ '8.2' ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out source code | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP environment | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '${{ matrix.php }}' | |
| ini-values: zend.assertions=1, error_reporting=-1, display_errors=On | |
| coverage: none | |
| tools: composer,cs2pr | |
| - name: Install Composer dependencies & cache dependencies | |
| uses: ramsey/composer-install@v3 | |
| env: | |
| COMPOSER_ROOT_VERSION: dev-${{ github.event.repository.default_branch }} | |
| with: | |
| # Bust the cache at least once a month - output format: YYYY-MM. | |
| custom-cache-suffix: $(date -u "+%Y-%m") | |
| - name: Grab PHPUnit version | |
| id: phpunit_version | |
| run: echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT | |
| # PHPUnit 10 may fail a test run when the "old" configuration format is used. | |
| # Luckily, there is a build-in migration tool since PHPUnit 9.3. | |
| - name: Migrate PHPUnit configuration for PHPUnit 10+ | |
| if: ${{ startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }} | |
| continue-on-error: true | |
| run: composer phpunit -- --migrate-configuration | |
| - name: Setup problem matcher to provide annotations for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Run PHPUnit | |
| run: composer phpunit |