Changeset 59251
- Timestamp:
- 10/18/2024 01:37:23 PM (13 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/reusable-phpunit-tests-v3.yml
r59208 r59251 43 43 type: 'string' 44 44 default: 'phpunit.xml.dist' 45 phpunit-test-groups: 46 description: 'A list of test groups to run.' 47 required: false 48 type: 'string' 49 default: '' 45 50 tests-domain: 46 51 description: 'The domain to use for the tests' … … 88 93 # - Submit the test results to the WordPress.org host test results. 89 94 phpunit-tests: 90 name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs. memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}95 name: PHP ${{ inputs.php }} / ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.phpunit-test-groups && format( ' ({0})', inputs.phpunit-test-groups ) || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }} 91 96 runs-on: ${{ inputs.os }} 92 97 timeout-minutes: 20 … … 163 168 run: npm run env:install 164 169 165 - name: Run PHPUnit tests 166 continue-on-error: ${{ inputs.allow-errors }} 167 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} 170 - name: Run PHPUnit tests${{ inputs.phpunit-test-groups && format( ' ({0} groups)', inputs.phpunit-test-groups ) || '' }} 171 continue-on-error: ${{ inputs.allow-errors }} 172 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}${{ inputs.phpunit-test-groups && format( ' --group {0}', inputs.phpunit-test-groups ) || '' }} 168 173 169 174 - name: Run AJAX tests 175 if: ${{ ! inputs.phpunit-test-groups }} 170 176 continue-on-error: ${{ inputs.allow-errors }} 171 177 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 172 178 173 179 - name: Run ms-files tests as a multisite install 174 if: ${{ inputs.multisite }}180 if: ${{ inputs.multisite && ! inputs.phpunit-test-groups }} 175 181 continue-on-error: ${{ inputs.allow-errors }} 176 182 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ms-files 177 183 178 184 - name: Run external HTTP tests 179 if: ${{ ! inputs.multisite }}185 if: ${{ ! inputs.multisite && ! inputs.phpunit-test-groups }} 180 186 continue-on-error: ${{ inputs.allow-errors }} 181 187 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group external-http … … 183 189 # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist. 184 190 - name: Run (Xdebug) tests 185 if: ${{ inputs.php != '8.4' }}191 if: ${{ inputs.php != '8.4' && ! inputs.phpunit-test-groups }} 186 192 continue-on-error: ${{ inputs.allow-errors }} 187 193 run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
Note: See TracChangeset
for help on using the changeset viewer.