Make WordPress Core

Changeset 58331


Ignore:
Timestamp:
06/04/2024 01:49:31 PM (11 months ago)
Author:
desrosj
Message:

Build/Test Tools: Add an input to allow errors for the PHPUnit workflow.

This allows a calling workflow to configure the PHPUnit workflow to continue-on-error when one occurs. This is useful for older branches where support for a specific version of PHP was not at 100% within the test suite.

Follow up to [58165], [58269], [58270], [58329].

See #61213.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/reusable-phpunit-tests.yml

    r58165 r58331  
    5050        required: false
    5151        type: 'boolean'
     52        default: false
     53      allow-errors:
     54        description: 'Whether to continue when test errors occur.'
     55        required: false
     56        type: boolean
    5257        default: false
    5358env:
     
    157162
    158163      - name: Run PHPUnit tests
     164        continue-on-error: ${{ inputs.allow-errors }}
    159165        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}
    160166
    161167      - name: Run AJAX tests
     168        continue-on-error: ${{ inputs.allow-errors }}
    162169        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
    163170
    164171      - name: Run ms-files tests as a multisite install
    165172        if: ${{ inputs.multisite }}
     173        continue-on-error: ${{ inputs.allow-errors }}
    166174        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ms-files
    167175
    168176      - name: Run external HTTP tests
    169177        if: ${{ ! inputs.multisite }}
     178        continue-on-error: ${{ inputs.allow-errors }}
    170179        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group external-http
    171180
     
    173182      - name: Run (Xdebug) tests
    174183        if: ${{ inputs.php != '8.3' }}
     184        continue-on-error: ${{ inputs.allow-errors }}
    175185        run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
    176186
Note: See TracChangeset for help on using the changeset viewer.