Make WordPress Core

Changeset 58644

Timestamp:
07/03/2024 03:38:50 PM (13 days ago)
Author:
desrosj
Message:

Build/Test Tools: Make use of new reusable workflows for 4.1.

This updates the 4.1 branch to utilize the new reusable workflows in trunk introduced in [58165].

This also includes backports for a some additional improvements and bug fixes that are necessary for the local development environment to continue working long term:

  • The image and platform properties for the mysql container have been updated to always prefer amd64 containers (#60822).
  • macos-13 is now pinned for MacOS jobs instead of macos-latest (#61340).
  • Migrating to Docker Compose V2 (#60901).
  • Removing the version property from docker-compose.yml (#59416).
  • Improvements to how artifacts and comments for Playground testing are generated.
  • Removing SVN related commands causing failures (#61216).
  • Updating the actions/github-scripts action to the latest version.
  • Improvements to the healthcheck command for the mysql container (#58867).

Merges [51673], [53552], [56464], [57918], [58157], [57124], [57125], [57249] to the 4.1 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin, Clorith, afragen, jrf.
See #58867, #61340, #60822, #61216, #60901, #61101, #59416, #59805, #61213.

Location:
branches/4.1
Files:
1 deleted
8 edited
1 moved

Legend:

Unmodified
Added
Removed
  • branches/4.1

  • branches/4.1/.github/workflows/coding-standards.yml

    r55535 r58644  
    4141  cancel-in-progress: true
    4242
     43
     44
     45
     46
    4347jobs:
    4448  # Runs the JavaScript coding standards checks.
    45   #
    46   # JSHint violations are not currently reported inline with annotations.
    47   #
    48   # Performs the following steps:
    49   # - Checks out the repository.
    50   # - Logs debug information about the GitHub Action runner.
    51   # - Installs NodeJS.
    52   # - Logs updated debug information.
    53   # _ Installs npm dependencies.
    54   # - Run the WordPress JSHint checks.
    5549  jshint:
    5650    name: JavaScript coding standards
    57     runs-on: ubuntu-latest
    58     timeout-minutes: 20
     51    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
     52    permissions:
     53      contents: read
    5954    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    60     env:
    61       PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    62 
    63     steps:
    64       - name: Checkout repository
    65         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    66 
    67       - name: Log debug information
    68         run: |
    69           npm --version
    70           node --version
    71           git --version
    72           svn --version
    73 
    74       - name: Set up Node.js
    75         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    76         with:
    77           node-version-file: '.nvmrc'
    78           cache: npm
    79 
    80       - name: Log debug information
    81         run: |
    82           npm --version
    83           node --version
    84 
    85       - name: Install Dependencies
    86         run: npm ci
    87 
    88       - name: Run JSHint
    89         run: npm run grunt jshint
    9055
    9156  slack-notifications:
    9257    name: Slack Notifications
    9358    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     59
     60
     61
    9462    needs: [ jshint ]
    9563    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     
    10573    name: Failed workflow tasks
    10674    runs-on: ubuntu-latest
     75
     76
    10777    needs: [ jshint, slack-notifications ]
    10878    if: |
     
    11787    steps:
    11888      - name: Dispatch workflow run
    119         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     89        uses: actions/github-script@
    12090        with:
    12191          retries: 2
  • branches/4.1/.github/workflows/javascript-tests.yml

    r55535 r58644  
    3939  cancel-in-progress: true
    4040
     41
     42
     43
     44
    4145jobs:
    4246  # Runs the QUnit tests for WordPress.
    43   #
    44   # Performs the following steps:
    45   # - Checks out the repository.
    46   # - Logs debug information about the GitHub Action runner.
    47   # - Installs NodeJS.
    48   # - Logs updated debug information.
    49   # _ Installs npm dependencies.
    50   # - Run the WordPress QUnit tests.
    5147  test-js:
    5248    name: QUnit Tests
    53     runs-on: ubuntu-latest
    54     timeout-minutes: 20
     49    uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
     50    permissions:
     51      contents: read
    5552    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    56 
    57     steps:
    58       - name: Checkout repository
    59         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    60 
    61       - name: Log debug information
    62         run: |
    63           npm --version
    64           node --version
    65           git --version
    66           svn --version
    67 
    68       - name: Set up Node.js
    69         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    70         with:
    71           node-version-file: '.nvmrc'
    72           cache: npm
    73 
    74       - name: Log debug information
    75         run: |
    76           npm --version
    77           node --version
    78 
    79       - name: Install Dependencies
    80         run: npm ci
    81 
    82       - name: Run QUnit tests
    83         run: npm run grunt qunit:compiled
    8453
    8554  slack-notifications:
    8655    name: Slack Notifications
    8756    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     57
     58
     59
    8860    needs: [ test-js ]
    8961    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     
    9971    name: Failed workflow tasks
    10072    runs-on: ubuntu-latest
     73
     74
    10175    needs: [ test-js, slack-notifications ]
    10276    if: |
     
    11185    steps:
    11286      - name: Dispatch workflow run
    113         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     87        uses: actions/github-script@
    11488        with:
    11589          retries: 2
  • branches/4.1/.github/workflows/phpunit-tests.yml

    r55535 r58644  
    2222# Cancels all previous workflow runs for pull requests that have not completed.
    2323concurrency:
    24     # The concurrency group contains the workflow name and the branch name for pull requests
    25     # or the commit hash for any other events.
     24  # The concurrency group contains the workflow name and the branch name for pull requests
     25  # or the commit hash for any other events.
    2626  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
    2727  cancel-in-progress: true
    2828
    29 env:
    30   LOCAL_DIR: build
    31   PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    32   COMPOSER_INSTALL: ${{ false }}
    33   # Controls which npm script to use for running PHPUnit tests. Options ar `php` and `php-composer`.
    34   PHPUNIT_SCRIPT: php
    35   LOCAL_PHP_MEMCACHED: ${{ false }}
     29# Disable permissions for all available scopes by default.
     30# Any needed permissions should be configured at the job level.
     31permissions: {}
    3632
    3733jobs:
    38   # Sets up WordPress for testing or development use.
    3934  #
    40   # Performs the following steps:
    41   # - Cancels all previous workflow runs for pull requests that have not completed.
    42   # - Checks out the repository.
    43   # - Logs debug information about the GitHub Action runner.
    44   # - Installs NodeJS.
    45   # _ Installs npm dependencies.
    46   # - Builds WordPress to run from the `build` directory.
    47   # - Creates a ZIP file of compiled WordPress.
    48   # - Uploads ZIP file as an artifact.
    49   setup-wordpress:
    50     name: Setup WordPress
    51     runs-on: ubuntu-latest
     35  # Creates a PHPUnit test job for each PHP combination.
     36  #
     37  test-php:
     38    name: PHP ${{ matrix.php }}
     39    uses: WordPress/wordpress-develop/.github/workflows/reusable-phpunit-tests-v1.yml@trunk
     40    permissions:
     41      contents: read
     42    secrets: inherit
    5243    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    53 
    54     steps:
    55       - name: Checkout repository
    56         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    57 
    58       - name: Log debug information
    59         run: |
    60           echo "$GITHUB_REF"
    61           echo "$GITHUB_EVENT_NAME"
    62           npm --version
    63           node --version
    64           curl --version
    65           git --version
    66           svn --version
    67           php --version
    68           php -i
    69           locale -a
    70 
    71       - name: Set up Node.js
    72         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    73         with:
    74           node-version-file: '.nvmrc'
    75           cache: npm
    76 
    77       - name: Install Dependencies
    78         run: npm ci
    79 
    80       - name: Build WordPress
    81         run: npm run build
    82 
    83       - name: Create ZIP artifact
    84         uses: thedoctor0/zip-release@a24011d8d445e4da5935a7e73c1f98e22a439464 # v0.7.1
    85         with:
    86           filename: built-wp-${{ github.sha }}.zip
    87           exclusions: '*.git* /*node_modules/* packagehash.txt'
    88 
    89       - name: Upload build artifact
    90         uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
    91         with:
    92           name: built-wp-${{ github.sha }}
    93           path: built-wp-${{ github.sha }}.zip
    94           if-no-files-found: error
    95 
    96   # Runs the PHPUnit tests for WordPress.
    97   #
    98   # Performs the following steps:
    99   # - Sets environment variables.
    100   # - Sets up the environment variables needed for testing with memcached (if desired).
    101   # - Downloads the built WordPress artifact from the previous job.
    102   # - Unzips the artifact.
    103   # - Installs NodeJS.
    104   # _ Installs npm dependencies.
    105   # - Configures caching for Composer.
    106   # _ Installs Composer dependencies (if desired).
    107   # - Logs Docker debug information (about the Docker installation within the runner).
    108   # - Starts the WordPress Docker container.
    109   # - Starts the Memcached server after the Docker network has been created (if desired).
    110   # - Logs general debug information about the runner.
    111   # - Logs the running Docker containers.
    112   # - Logs debug information from inside the WordPress Docker container.
    113   # - Logs debug information about what's installed within the WordPress Docker containers.
    114   # - Install WordPress within the Docker container.
    115   # - Run the PHPUnit tests.
    116   # - Checks out the WordPress Test reporter repository.
    117   # - Reconnect the directory to the Git repository.
    118   # - Submit the test results to the WordPress.org host test results.
    119   test-php:
    120     name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
    121     needs: setup-wordpress
    122     runs-on: ${{ matrix.os }}
    123     timeout-minutes: 20
    12444    strategy:
    12545      fail-fast: false
    12646      matrix:
     47
    12748        php: [ '5.3', '5.4', '5.5' ]
    128         os: [ ubuntu-latest ]
    12949        split_slow: [ false, true ]
    13050        multisite: [ false, true ]
     
    15575            multisite: true
    15676            memcached: false
    157     env:
    158       LOCAL_PHP: ${{ matrix.php }}-fpm
    159       LOCAL_PHPUNIT: ${{ matrix.phpunit && matrix.phpunit || matrix.php }}-fpm
    160       LOCAL_PHP_MEMCACHED: ${{ matrix.memcached }}
    161       PHPUNIT_CONFIG: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
    162       SLOW_TESTS: 'external-http,media'
    163 
    164     steps:
    165       - name: Configure environment variables
    166         run: |
    167           echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
    168           echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
    169 
    170       - name: Download the built WordPress artifact
    171         uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
    172         with:
    173           name: built-wp-${{ github.sha }}
    174 
    175       - name: Unzip built artifact
    176         run: unzip built-wp-${{ github.sha }}.zip
    177 
    178       - name: Set up Node.js
    179         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    180         with:
    181           node-version-file: '.nvmrc'
    182           cache: npm
    183 
    184       - name: Install Dependencies
    185         run: npm ci
    186 
    187       - name: Cache Composer dependencies
    188         if: ${{ env.COMPOSER_INSTALL == true }}
    189         uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    190         env:
    191           cache-name: cache-composer-dependencies
    192         with:
    193           path: ${{ steps.composer-cache.outputs.dir }}
    194           key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
    195 
    196       - name: Install Composer dependencies
    197         if: ${{ env.COMPOSER_INSTALL == true }}
    198         run: |
    199           docker-compose run --rm php composer --version
    200           docker-compose run --rm php composer install
    201 
    202       - name: Docker debug information
    203         run: |
    204           docker -v
    205           docker-compose -v
    206 
    207       - name: Start Docker environment
    208         run: |
    209           npm run env:start
    210 
    211       # The memcached server needs to start after the Docker network has been set up with `npm run env:start`.
    212       - name: Start the Memcached server.
    213         if: ${{ matrix.memcached }}
    214         run: |
    215           cp tests/phpunit/includes/object-cache.php build/wp-content/object-cache.php
    216           docker run --name memcached --net $(basename "$PWD")_wpdevnet -d memcached
    217 
    218       - name: General debug information
    219         run: |
    220           npm --version
    221           node --version
    222           curl --version
    223           git --version
    224           svn --version
    225 
    226       - name: Log running Docker containers
    227         run: docker ps -a
    228 
    229       - name: WordPress Docker container debug information
    230         run: |
    231           docker-compose run --rm mysql mysql --version
    232           docker-compose run --rm php php --version
    233           docker-compose run --rm php php -m
    234           docker-compose run --rm php php -i
    235           docker-compose run --rm php locale -a
    236 
    237       - name: Install WordPress
    238         run: npm run env:install
    239 
    240       - name: Run slow PHPUnit tests
    241         if: ${{ matrix.split_slow }}
    242         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }}
    243 
    244       - name: Run PHPUnit tests for single site excluding slow tests
    245         if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }}
    246         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required
    247 
    248       - name: Run PHPUnit tests for Multisite excluding slow tests
    249         if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }}
    250         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers
    251 
    252       - name: Run PHPUnit tests
    253         if: ${{ matrix.php >= '7.0' }}
    254         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }}
    255 
    256       - name: Run AJAX tests
    257         if: ${{ ! matrix.multisite && ! matrix.split_slow }}
    258         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
    259 
    260       - name: Run external HTTP tests
    261         if: ${{ ! matrix.multisite && ! matrix.split_slow }}
    262         run: npm run test:${{ env.PHPUNIT_SCRIPT }} -- --verbose -c phpunit.xml.dist --group external-http
    263 
    264       - name: Checkout the WordPress Test Reporter
    265         if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
    266         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    267         with:
    268           repository: 'WordPress/phpunit-test-runner'
    269           path: 'test-runner'
    270 
    271       - name: Set up the Git repository
    272         if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
    273         run: |
    274           git init
    275           git remote add origin https://github.com/WordPress/wordpress-develop.git
    276           git fetch
    277           git reset origin/trunk
    278 
    279       - name: Submit test results to the WordPress.org host test results
    280         if: ${{ github.repository == 'WordPress/wordpress-develop' && github.ref == 'refs/heads/trunk' && matrix.report }}
    281         env:
    282           WPT_REPORT_API_KEY: "${{ secrets.WPT_REPORT_API_KEY }}"
    283         run: docker-compose run --rm -e WPT_REPORT_API_KEY -e WPT_PREPARE_DIR=/var/www -e WPT_TEST_DIR=/var/www php php test-runner/report.php
     77    with:
     78      os: ${{ matrix.os }}
     79      php: ${{ matrix.php }}
     80      phpunit: ${{ matrix.phpunit && matrix.phpunit || matrix.php }}
     81      multisite: ${{ matrix.multisite }}
     82      split_slow: ${{ matrix.split_slow }}
     83      memcached: ${{ matrix.memcached }}
     84      phpunit-config: ${{ matrix.multisite && 'tests/phpunit/multisite.xml' || 'phpunit.xml.dist' }}
    28485
    28586  slack-notifications:
    28687    name: Slack Notifications
    28788    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
    288     needs: [ setup-wordpress, test-php ]
     89    permissions:
     90      actions: read
     91      contents: read
     92    needs: [ test-php ]
    28993    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    29094    with:
     
    299103    name: Failed workflow tasks
    300104    runs-on: ubuntu-latest
     105
     106
    301107    needs: [ test-php, slack-notifications ]
    302108    if: |
     
    311117    steps:
    312118      - name: Dispatch workflow run
    313         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     119        uses: actions/github-script@
    314120        with:
    315121          retries: 2
  • branches/4.1/.github/workflows/test-build-processes.yml

    r58643 r58644  
    1 name: Test npm
     1name: Test
    22
    33on:
     
    2929# Cancels all previous workflow runs for pull requests that have not completed.
    3030concurrency:
    31     # The concurrency group contains the workflow name and the branch name for pull requests
    32     # or the commit hash for any other events.
     31  # The concurrency group contains the workflow name and the branch name for pull requests
     32  # or the commit hash for any other events.
    3333  group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
    3434  cancel-in-progress: true
    3535
    36 env:
    37   PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
     36# Disable permissions for all available scopes by default.
     37# Any needed permissions should be configured at the job level.
     38permissions: {}
    3839
    3940jobs:
    40   # Verifies that installing npm dependencies and building WordPress works as expected.
    41   #
    42   # Performs the following steps:
    43   # - Checks out the repository.
    44   # - Logs debug information about the GitHub Action runner.
    45   # - Installs NodeJS.
    46   # - Sets up caching for npm.
    47   # _ Installs npm dependencies.
    48   # - Builds WordPress to run from the `build` directory.
    49   # - Cleans up after building WordPress to the `build` directory.
    50   test-npm:
    51     name: Test npm on ${{ matrix.os }}
    52     runs-on: ${{ matrix.os }}
    53     timeout-minutes: 20
     41  # Tests the WordPress Core build process on multiple operating systems.
     42  test-core-build-process:
     43    name: Core running from ${{ matrix.directory }}
     44    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
     45    permissions:
     46      contents: read
    5447    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    5548    strategy:
     49
    5650      matrix:
    5751        os: [ ubuntu-latest, windows-latest ]
     52
     53
     54
     55
     56
     57
     58
     59
     60
     61
     62
    5863
    59     steps:
    60       - name: Checkout repository
    61         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    62 
    63       - name: Log debug information
    64         run: |
    65           npm --version
    66           node --version
    67           curl --version
    68           git --version
    69           svn --version
    70 
    71       - name: Set up Node.js
    72         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    73         with:
    74           node-version-file: '.nvmrc'
    75           cache: npm
    76 
    77       - name: Install Dependencies
    78         run: npm ci
    79 
    80       - name: Build WordPress
    81         run: npm run build
    82 
    83       - name: Clean after building
    84         run: npm run grunt clean
    85 
    86   # Verifies that installing npm dependencies and building WordPress works as expected on MacOS.
     64  # Tests the WordPress Core build process on MacOS.
    8765  #
    88   # This is separate from the job above in order to use stricter conditions about when to run.
     66  # This is separate from the job above in order to use stricter conditions when to run.
    8967  # This avoids unintentionally consuming excessive minutes, as MacOS jobs consume minutes at a 10x rate.
    9068  #
     
    9270  # currently no way to determine the OS being used on a given job.
    9371  # See https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability.
    94   #
    95   # Performs the following steps:
    96   # - Checks out the repository.
    97   # - Logs debug information about the GitHub Action runner.
    98   # - Installs NodeJS.
    99   # _ Installs npm dependencies.
    100   # - Builds WordPress to run from the `build` directory.
    101   # - Cleans up after building WordPress to the `build` directory.
    102   test-npm-macos:
    103     name: Test npm on MacOS
    104     runs-on: macos-latest
    105     timeout-minutes: 30
     72  test-core-build-process-macos:
     73    name: Core running from ${{ matrix.directory }}
     74    uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk
     75    permissions:
     76      contents: read
    10677    if: ${{ github.repository == 'WordPress/wordpress-develop' }}
    107     steps:
    108       - name: Checkout repository
    109         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    110 
    111       - name: Log debug information
    112         run: |
    113           npm --version
    114           node --version
    115           curl --version
    116           git --version
    117           svn --version
    118 
    119       - name: Set up Node.js
    120         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    121         with:
    122           node-version-file: '.nvmrc'
    123           cache: npm
    124 
    125       - name: Install Dependencies
    126         run: npm ci
    127 
    128       - name: Build WordPress
    129         run: npm run build
    130 
    131       - name: Clean after building
    132         run: npm run grunt clean
     78    strategy:
     79      fail-fast: false
     80      matrix:
     81        os: [ macos-13 ]
     82        directory: [ 'build' ]
     83    with:
     84      os: ${{ matrix.os }}
     85      directory: ${{ matrix.directory }}
     86      test-emoji: false
    13387
    13488  slack-notifications:
    13589    name: Slack Notifications
    13690    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
    137     needs: [ test-npm, test-npm-macos ]
     91    permissions:
     92      actions: read
     93      contents: read
     94    needs: [ test-core-build-process, test-core-build-process-macos ]
    13895    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    13996    with:
    140       calling_status: ${{ needs.test-npm.result == 'success' && needs.test-npm-macos.result == 'success' && 'success' || ( needs.test-npm.result == 'cancelled' || needs.test-npm-macos.result == 'cancelled' ) && 'cancelled' || 'failure' }}
     97      calling_status: ${{ ' }}
    14198    secrets:
    14299      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     
    148105    name: Failed workflow tasks
    149106    runs-on: ubuntu-latest
    150     needs: [ test-npm, test-npm-macos, slack-notifications ]
     107    permissions:
     108      actions: write
     109    needs: [ slack-notifications ]
    151110    if: |
    152111      always() &&
     
    155114      github.run_attempt < 2 &&
    156115      (
    157         needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' ||
    158         needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'
     116        ||
     117       
    159118      )
    160119
    161120    steps:
    162121      - name: Dispatch workflow run
    163         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     122        uses: actions/github-script@
    164123        with:
    165124          retries: 2
  • branches/4.1/docker-compose.yml

    r55535 r58644  
    1 version: '3.7'
    2 
    31services:
    42
     
    2624
    2725    depends_on:
    28       - php
     26      php:
     27        condition: service_started
     28      mysql:
     29        condition: service_healthy
    2930
    3031  ##
     
    3839
    3940    environment:
    40       LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
    41       LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
    42       PHP_FPM_UID: ${PHP_FPM_UID-1000}
    43       PHP_FPM_GID: ${PHP_FPM_GID-1000}
     41      ${LOCAL_PHP_XDEBUG-false}
     42      ${LOCAL_PHP_MEMCACHED-false}
     43      ${PHP_FPM_UID-1000}
     44      ${PHP_FPM_GID-1000}
    4445
    4546    volumes:
     
    4748      - ./:/var/www
    4849
    49     depends_on:
    50       - mysql
     50   
     51   
    5152
    5253  ##
     
    5455  ##
    5556  mysql:
    56     image: amd64/${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-5.6}
     57    image: ${LOCAL_DB_TYPE-mysql}:${LOCAL_DB_VERSION-5.6}
     58    platform: linux/amd64
    5759
    5860    networks:
     
    7274    command: --default-authentication-plugin=mysql_native_password
    7375
     76
     77
     78
     79
     80
     81
    7482  ##
    7583  # The WP CLI container.
     
    8290
    8391    environment:
    84       LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
    85       LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
    86       PHP_FPM_UID: ${PHP_FPM_UID-1000}
    87       PHP_FPM_GID: ${PHP_FPM_GID-1000}
     92      ${LOCAL_PHP_XDEBUG-false}
     93      ${LOCAL_PHP_MEMCACHED-false}
     94      ${PHP_FPM_UID-1000}
     95      ${PHP_FPM_GID-1000}
    8896
    8997    volumes:
     
    92100    # The init directive ensures the command runs with a PID > 1, so Ctrl+C works correctly.
    93101    init: true
     102
     103
     104
     105
     106
     107
    94108
    95109  ##
     
    103117
    104118    environment:
    105       LOCAL_PHP_XDEBUG: ${LOCAL_PHP_XDEBUG-false}
    106       LOCAL_PHP_MEMCACHED: ${LOCAL_PHP_MEMCACHED-false}
    107       LOCAL_DIR: ${LOCAL_DIR-src}
    108       WP_MULTISITE: ${WP_MULTISITE-false}
    109       PHP_FPM_UID: ${PHP_FPM_UID-1000}
    110       PHP_FPM_GID: ${PHP_FPM_GID-1000}
    111       TRAVIS_BRANCH: ${TRAVIS_BRANCH-false}
    112       TRAVIS_PULL_REQUEST: ${TRAVIS_PULL_REQUEST-false}
    113       GITHUB_REF: ${GITHUB_REF-false}
    114       GITHUB_EVENT_NAME: ${GITHUB_EVENT_NAME-false}
     119      ${LOCAL_PHP_XDEBUG-false}
     120      ${LOCAL_PHP_MEMCACHED-false}
     121      ${LOCAL_DIR-src}
     122      ${WP_MULTISITE-false}
     123      ${PHP_FPM_UID-1000}
     124      ${PHP_FPM_GID-1000}
     125      ${TRAVIS_BRANCH-false}
     126      ${TRAVIS_PULL_REQUEST-false}
     127      ${GITHUB_REF-false}
     128      ${GITHUB_EVENT_NAME-false}
    115129
    116130    volumes:
  • branches/4.1/tools/local-env/scripts/docker.js

    r50247 r58644  
    55dotenvExpand( dotenv.config() );
    66
    7 // Execute any docker-compose command passed to this script.
    8 execSync( 'docker-compose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
     7// Execute any dockercompose command passed to this script.
     8execSync( 'dockercompose ' + process.argv.slice( 2 ).join( ' ' ), { stdio: 'inherit' } );
  • branches/4.1/tools/local-env/scripts/install.js

    r50320 r58644  
    4646 */
    4747function wp_cli( cmd ) {
    48     execSync( `docker-compose run --rm cli ${cmd}`, { stdio: 'inherit' } );
     48    execSync( `dockercompose run --rm cli ${cmd}`, { stdio: 'inherit' } );
    4949}
    5050
     
    5555    const test_plugin_directory = 'tests/phpunit/data/plugins/wordpress-importer';
    5656
    57     execSync( `docker-compose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
     57    execSync( `dockercompose exec -T php rm -rf ${test_plugin_directory} && svn checkout -r ${process.env.WP_IMPORTER_REVISION} https://plugins.svn.wordpress.org/wordpress-importer/trunk/ ${test_plugin_directory}`, { stdio: 'inherit' } );
    5858}
  • branches/4.1/tools/local-env/scripts/start.js

    r50247 r58644  
    66
    77// Start the local-env containers.
    8 execSync( 'docker-compose up -d wordpress-develop', { stdio: 'inherit' } );
     8execSync( 'dockercompose up -d wordpress-develop', { stdio: 'inherit' } );
    99
    1010// If Docker Toolbox is being used, we need to manually forward LOCAL_PORT to the Docker VM.
Note: See TracChangeset for help on using the changeset viewer.