Add OpenAI pricing/costs usage feature. #552
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: PHPUnit Tests | |
| on: | |
| push: | |
| branches: | |
| - develop | |
| - trunk | |
| paths: | |
| - "**.php" | |
| pull_request: | |
| branches: | |
| - develop | |
| paths: | |
| - "**.php" | |
| jobs: | |
| phpunit: | |
| name: ${{ matrix.php }} on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [ '7.4', '8.0', '8.1' ] | |
| os: [ ubuntu-latest ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Cache dependencies | |
| id: cache-composer | |
| uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4.2.2 | |
| env: | |
| cache-name: cache-composer | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }} | |
| - uses: getong/mariadb-action@d6d2ec41fd5588f369be4c9398ce77ee725ca9ea # v1.11 | |
| - name: Set PHP version | |
| uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2.32.0 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: none | |
| tools: phpunit-polyfills, composer:v2 | |
| - name: Install dependencies | |
| run: composer update -W | |
| - name: Setup WP Tests | |
| run: bash bin/install-wp-tests.sh wordpress_test root '' 127.0.0.1 | |
| - name: PHPUnit | |
| run: './vendor/bin/phpunit' |