Make WordPress Core

Changeset 59673


Ignore:
Timestamp:
01/21/2025 03:40:51 PM (3 months ago)
Author:
johnbillion
Message:

Build/Test Tools: Switch to using local references for reusable workflows.

The benefit of this is that when PRs are made to make changes to a reusable workflow, the references doesn't need to be updated to point to the fork in order for the changed workflow to run.

A npm run grunt replace:workflow-references-local-to-remote command has also been introduced in order to convert these local references back to remote ones. This command can be used to switch release branches over to using remote workflows, as they are currently, so they continue to benefit from workflow changes in trunk without the need for continual backporting to all the branches.

Props desrosj, johnbillion

Fixes #62416

Location:
trunk
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/coding-standards.yml

    r59252 r59673  
    5050  phpcs:
    5151    name: PHP coding standards
    52     uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
     52    uses: ./.github/workflows/reusable-coding-standards-php.yml
    5353    permissions:
    5454      contents: read
     
    5858  jshint:
    5959    name: JavaScript coding standards
    60     uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
     60    uses: ./.github/workflows/reusable-coding-standards-javascript.yml
    6161    permissions:
    6262      contents: read
     
    6565  slack-notifications:
    6666    name: Slack Notifications
    67     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     67    uses: ./.github/workflows/slack-notifications.yml
    6868    permissions:
    6969      actions: read
  • trunk/.github/workflows/end-to-end-tests.yml

    r58165 r59673  
    3939  e2e-tests:
    4040    name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
    41     uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
     41    uses: ./.github/workflows/reusable-end-to-end-tests.yml
    4242    permissions:
    4343      contents: read
     
    5252  slack-notifications:
    5353    name: Slack Notifications
    54     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     54    uses: ./.github/workflows/slack-notifications.yml
    5555    permissions:
    5656      actions: read
  • trunk/.github/workflows/install-testing.yml

    r59585 r59673  
    4444  build-test-matrix:
    4545    name: Build Test Matrix
    46     uses: WordPress/wordpress-develop/.github/workflows/reusable-support-json-reader-v1.yml@trunk
     46    uses: ./.github/workflows/reusable-support-json-reader-v1.yml
    4747    permissions:
    4848      contents: read
     
    133133  slack-notifications:
    134134    name: Slack Notifications
    135     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     135    uses: ./.github/workflows/slack-notifications.yml
    136136    permissions:
    137137      actions: read
  • trunk/.github/workflows/javascript-tests.yml

    r59252 r59673  
    4848  test-js:
    4949    name: QUnit Tests
    50     uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
     50    uses: ./.github/workflows/reusable-javascript-tests.yml
    5151    permissions:
    5252      contents: read
     
    5555  slack-notifications:
    5656    name: Slack Notifications
    57     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     57    uses: ./.github/workflows/slack-notifications.yml
    5858    permissions:
    5959      actions: read
  • trunk/.github/workflows/local-docker-environment.yml

    r59585 r59673  
    6464  build-test-matrix:
    6565    name: Build Test Matrix
    66     uses: WordPress/wordpress-develop/.github/workflows/reusable-support-json-reader-v1.yml@trunk
     66    uses: ./.github/workflows/reusable-support-json-reader-v1.yml
    6767    permissions:
    6868      contents: read
     
    7575  environment-tests-mysql:
    7676    name: PHP ${{ matrix.php }}
    77     uses: WordPress/wordpress-develop/.github/workflows/reusable-test-local-docker-environment-v1.yml@trunk
     77    uses: ./.github/workflows/reusable-test-local-docker-environment-v1.yml
    7878    permissions:
    7979      contents: read
     
    109109  slack-notifications:
    110110    name: Slack Notifications
    111     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     111    uses: ./.github/workflows/slack-notifications.yml
    112112    permissions:
    113113      actions: read
  • trunk/.github/workflows/performance.yml

    r59577 r59673  
    3434  performance:
    3535    name: ${{ matrix.multisite && 'Multisite' || 'Single site' }}
    36     uses: WordPress/wordpress-develop/.github/workflows/reusable-performance.yml@trunk
     36    uses: ./.github/workflows/reusable-performance.yml
    3737    permissions:
    3838      contents: read
     
    5151  slack-notifications:
    5252    name: Slack Notifications
    53     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     53    uses: ./.github/workflows/slack-notifications.yml
    5454    permissions:
    5555      actions: read
  • trunk/.github/workflows/php-compatibility.yml

    r59252 r59673  
    4545  php-compatibility:
    4646    name: Check PHP compatibility
    47     uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk
     47    uses: ./.github/workflows/reusable-php-compatibility.yml
    4848    permissions:
    4949      contents: read
     
    5252  slack-notifications:
    5353    name: Slack Notifications
    54     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     54    uses: ./.github/workflows/slack-notifications.yml
    5555    permissions:
    5656      actions: read
  • trunk/.github/workflows/phpunit-tests.yml

    r59587 r59673  
    3737  test-with-mysql:
    3838    name: PHP ${{ matrix.php }}
    39     uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
     39    uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
    4040    permissions:
    4141      contents: read
     
    108108  test-with-mariadb:
    109109    name: PHP ${{ matrix.php }}
    110     uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
     110    uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
    111111    permissions:
    112112      contents: read
     
    158158  test-innovation-releases:
    159159    name: PHP ${{ matrix.php }}
    160     uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
     160    uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
    161161    permissions:
    162162      contents: read
     
    201201  specific-test-groups:
    202202    name: ${{ matrix.phpunit-test-groups }}
    203     uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
     203    uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
    204204    permissions:
    205205      contents: read
     
    221221  slack-notifications:
    222222    name: Slack Notifications
    223     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     223    uses: ./.github/workflows/slack-notifications.yml
    224224    permissions:
    225225      actions: read
  • trunk/.github/workflows/test-and-zip-default-themes.yml

    r59354 r59673  
    199199  slack-notifications:
    200200    name: Slack Notifications
    201     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     201    uses: ./.github/workflows/slack-notifications.yml
    202202    permissions:
    203203      actions: read
  • trunk/.github/workflows/test-build-processes.yml

    r58345 r59673  
    3232  test-core-build-process:
    3333    name: Core running from ${{ matrix.directory }}
    34     uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
     34    uses: ./.github/workflows/reusable-test-core-build-process.yml
    3535    permissions:
    3636      contents: read
     
    6464  test-core-build-process-macos:
    6565    name: Core running from ${{ matrix.directory }}
    66     uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
     66    uses: ./.github/workflows/reusable-test-core-build-process.yml
    6767    permissions:
    6868      contents: read
     
    8080  test-gutenberg-build-process:
    8181    name: Gutenberg running from ${{ matrix.directory }}
    82     uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk
     82    uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
    8383    permissions:
    8484      contents: read
     
    103103  test-gutenberg-build-process-macos:
    104104    name: Gutenberg running from ${{ matrix.directory }}
    105     uses: WordPress/wordpress-develop/.github/workflows/reusable-test-gutenberg-build-process.yml@trunk
     105    uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
    106106    permissions:
    107107      contents: read
     
    118118  slack-notifications:
    119119    name: Slack Notifications
    120     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     120    uses: ./.github/workflows/slack-notifications.yml
    121121    permissions:
    122122      actions: read
  • trunk/.github/workflows/test-coverage.yml

    r59355 r59673  
    5050  test-coverage-report:
    5151    name: ${{ matrix.multisite && 'Multisite' || 'Single site' }} report
    52     uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v3.yml@trunk
     52    uses: ./.github/workflows/reusable-phpunit-tests-v3.yml
    5353    permissions:
    5454      contents: read
     
    6868  slack-notifications:
    6969    name: Slack Notifications
    70     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     70    uses: ./.github/workflows/slack-notifications.yml
    7171    permissions:
    7272      actions: read
  • trunk/.github/workflows/test-old-branches.yml

    r59529 r59673  
    133133  slack-notifications:
    134134    name: Slack Notifications
    135     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     135    uses: ./.github/workflows/slack-notifications.yml
    136136    permissions:
    137137      actions: read
  • trunk/.github/workflows/upgrade-testing.yml

    r59531 r59673  
    5858  upgrade-tests-last-two-releases:
    5959    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    60     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     60    uses: ./.github/workflows/reusable-upgrade-testing.yml
    6161    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    6262    permissions:
     
    9595  upgrade-tests-wp-6x-mysql:
    9696    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    97     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     97    uses: ./.github/workflows/reusable-upgrade-testing.yml
    9898    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    9999    permissions:
     
    127127  upgrade-tests-wp-5x-php-7x-mysql:
    128128    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    129     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     129    uses: ./.github/workflows/reusable-upgrade-testing.yml
    130130    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    131131    strategy:
     
    161161  upgrade-tests-wp-5x-php-8x-mysql:
    162162    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    163     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     163    uses: ./.github/workflows/reusable-upgrade-testing.yml
    164164    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    165165    strategy:
     
    186186  upgrade-tests-wp-4x-php-7x-mysql:
    187187    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    188     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     188    uses: ./.github/workflows/reusable-upgrade-testing.yml
    189189    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    190190    strategy:
     
    222222  upgrade-tests-wp-4x-php-8x-mysql:
    223223    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    224     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     224    uses: ./.github/workflows/reusable-upgrade-testing.yml
    225225    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    226226    strategy:
     
    246246  upgrade-tests-oldest-wp-mysql:
    247247    name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
    248     uses: WordPress/wordpress-develop/.github/workflows/reusable-upgrade-testing.yml@trunk
     248    uses: ./.github/workflows/reusable-upgrade-testing.yml
    249249    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    250250    strategy:
     
    280280  slack-notifications:
    281281    name: Slack Notifications
    282     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     282    uses: ./.github/workflows/slack-notifications.yml
    283283    permissions:
    284284      actions: read
  • trunk/Gruntfile.js

    r59443 r59673  
    457457                    }
    458458                }
     459            },
     460            'workflow-references-local-to-remote': {
     461                options: {
     462                    processContent: function( src ) {
     463                        return src.replace( /uses: \.\/\.github\/workflows\/([^\.]+)\.yml/g, function( match, $1 ) {
     464                            return 'uses: WordPress/wordpress-develop/.github/workflows/' + $1 + '.yml@trunk';
     465                        } );
     466                    }
     467                },
     468                src: '.github/workflows/*.yml',
     469                dest: './'
     470            },
     471            'workflow-references-remote-to-local': {
     472                options: {
     473                    processContent: function( src ) {
     474                        return src.replace( /uses: WordPress\/wordpress-develop\/\.github\/workflows\/([^\.]+)\.yml@trunk/g, function( match, $1 ) {
     475                            return 'uses: ./.github/workflows/' + $1 + '.yml';
     476                        } );
     477                    }
     478                },
     479                src: '.github/workflows/*.yml',
     480                dest: './'
    459481            }
    460482        },
     
    15141536    ] );
    15151537
     1538    grunt.registerTask( 'replace:workflow-references-local-to-remote', [
     1539        'copy:workflow-references-local-to-remote',
     1540    ]);
     1541
     1542    grunt.registerTask( 'replace:workflow-references-remote-to-local', [
     1543        'copy:workflow-references-remote-to-local',
     1544    ]);
     1545
    15161546    /**
    15171547     * Build verification tasks.
Note: See TracChangeset for help on using the changeset viewer.