Make WordPress Core


Ignore:
Timestamp:
06/06/2024 03:27:31 PM (8 months ago)
Author:
desrosj
Message:

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

This updates the 6.0 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).
  • Run E2E tests with and without SCRIPT_DEBUG (#58661).
  • 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.
  • Move the Memcached container into the Docker Compose config (#55700).
  • Configure Xdebug modes in the local Docker environment (#56022).

Merges [53895], [53552], [56113], [56114], [57918], [58157], [57124], [57125], [57249] to the 6.0 branch.

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.0/.github/workflows/end-to-end-tests.yml

    r57202 r58357  
    99      - '[6-9].[0-9]'
    1010    tags:
    11       - '5.[3-9]*'
    12       - '[6-9].[0-9]*'
     11      - '[0-9]+.[0-9]'
     12      - '[0-9]+.[0-9].[0-9]+'
     13      - '![34].[0-9].[0-9]+'
     14      - '!5.[0-2].[0-9]+'
    1315  pull_request:
    1416    branches:
     
    2527  cancel-in-progress: true
    2628
     29# Disable permissions for all available scopes by default.
     30# Any needed permissions should be configured at the job level.
     31permissions: {}
     32
    2733env:
    2834  LOCAL_DIR: build
    29   LOCAL_PHP: 8.0-fpm
    3035
    3136jobs:
    3237  # Runs the end-to-end test suite.
    33   #
    34   # Performs the following steps:
    35   # - Sets environment variables.
    36   # - Checks out the repository.
    37   # - Sets up Node.js.
    38   # - Logs debug information about the GitHub Action runner.
    39   # - Installs npm dependencies.
    40   # - Builds WordPress to run from the `build` directory.
    41   # - Starts the WordPress Docker container.
    42   # - Logs the running Docker containers.
    43   # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
    44   # - Install WordPress within the Docker container.
    45   # - Run the E2E tests.
    46   # - Ensures version-controlled files are not modified or deleted.
    4738  e2e-tests:
    48     name: E2E Tests
    49     runs-on: ubuntu-latest
    50     timeout-minutes: 20
     39    name: Test with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
     40    uses: WordPress/wordpress-develop/.github/workflows/reusable-end-to-end-tests.yml@trunk
     41    permissions:
     42      contents: read
    5143    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    52 
    53     steps:
    54       - name: Configure environment variables
    55         run: |
    56           echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
    57           echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
    58 
    59       - name: Checkout repository
    60         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    61 
    62       - name: Set up Node.js
    63         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    64         with:
    65           node-version-file: '.nvmrc'
    66           cache: npm
    67 
    68       - name: Log debug information
    69         run: |
    70           npm --version
    71           node --version
    72           curl --version
    73           git --version
    74           svn --version
    75           locale -a
    76 
    77       - name: Install npm Dependencies
    78         run: npm ci
    79 
    80       - name: Build WordPress
    81         run: npm run build
    82 
    83       - name: Start Docker environment
    84         run: |
    85           npm run env:start
    86 
    87       - name: Log running Docker containers
    88         run: docker ps -a
    89 
    90       - name: Docker debug information
    91         run: |
    92           docker -v
    93           docker-compose -v
    94           docker-compose run --rm mysql mysql --version
    95           docker-compose run --rm php php --version
    96           docker-compose run --rm php php -m
    97           docker-compose run --rm php php -i
    98           docker-compose run --rm php locale -a
    99 
    100       - name: Install WordPress
    101         run: npm run env:install
    102 
    103       - name: Run E2E tests
    104         run: npm run test:e2e
    105 
    106       - name: Ensure version-controlled files are not modified or deleted
    107         run: git diff --exit-code
    108 
    109   slack-notifications:
    110     name: Slack Notifications
    111     uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
    112     needs: [ e2e-tests ]
    113     if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     44    strategy:
     45      fail-fast: false
     46      matrix:
     47        LOCAL_SCRIPT_DEBUG: [ true, false ]
    11448    with:
    115       calling_status: ${{ needs.e2e-tests.result == 'success' && 'success' || needs.e2e-tests.result == 'cancelled' && 'cancelled' || 'failure' }}
    116     secrets:
    117       SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
    118       SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
    119       SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
    120       SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
     49      LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
     50      php-version: '8.0'
     51      install-gutenberg: false
    12152
    12253  failed-workflow:
    12354    name: Failed workflow tasks
    12455    runs-on: ubuntu-latest
    125     needs: [ e2e-tests, slack-notifications ]
     56    permissions:
     57      actions: write
     58    needs: [ e2e-tests ]
    12659    if: |
    12760      always() &&
     
    13265        needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
    13366      )
    134 
    13567    steps:
    13668      - name: Dispatch workflow run
    137         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     69        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    13870        with:
    13971          retries: 2
Note: See TracChangeset for help on using the changeset viewer.