Make WordPress Core


Ignore:
Timestamp:
05/31/2024 07:23:44 PM (12 months ago)
Author:
desrosj
Message:

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

This updates the 6.4 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:

  • 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.

Merges [57918], [58157], [57124], [57125], [57249] to the 6.4 branch.

Props johnbillion, joemcgill, swissspidy, thelovekesh, narenin, mukesh27, JeffPaul, peterwilsoncc, zieladam, ockham, SergeyBiryukov, jorbin.
Fixes #61216. See #60901, #61101, #59416, #59805, #61213.

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/.github/workflows/end-to-end-tests.yml

    r56954 r58276  
    3737jobs:
    3838  # Runs the end-to-end test suite.
    39   #
    40   # Performs the following steps:
    41   # - Sets environment variables.
    42   # - Checks out the repository.
    43   # - Sets up Node.js.
    44   # - Logs debug information about the GitHub Action runner.
    45   # - Installs npm dependencies.
    46   # - Install Playwright browsers.
    47   # - Builds WordPress to run from the `build` directory.
    48   # - Starts the WordPress Docker container.
    49   # - Logs the running Docker containers.
    50   # - Logs Docker debug information (about both the Docker installation within the runner and the WordPress container).
    51   # - Install WordPress within the Docker container.
    52   # - Install Gutenberg.
    53   # - Run the E2E tests.
    54   # - Ensures version-controlled files are not modified or deleted.
    5539  e2e-tests:
    56     name: E2E Tests with SCRIPT_DEBUG ${{ matrix.LOCAL_SCRIPT_DEBUG && 'enabled' || 'disabled' }}
    57     runs-on: ubuntu-latest
     40    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
    5842    permissions:
    5943      contents: read
    60     timeout-minutes: 20
    6144    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    6245    strategy:
     
    6447      matrix:
    6548        LOCAL_SCRIPT_DEBUG: [ true, false ]
    66 
    67     steps:
    68       - name: Configure environment variables
    69         run: |
    70           echo "PHP_FPM_UID=$(id -u)" >> $GITHUB_ENV
    71           echo "PHP_FPM_GID=$(id -g)" >> $GITHUB_ENV
    72 
    73       - name: Checkout repository
    74         uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
    75         with:
    76           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    77 
    78       - name: Set up Node.js
    79         uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1
    80         with:
    81           node-version-file: '.nvmrc'
    82           cache: npm
    83 
    84       - name: Log debug information
    85         run: |
    86           npm --version
    87           node --version
    88           curl --version
    89           git --version
    90           svn --version
    91           locale -a
    92 
    93       - name: Install npm Dependencies
    94         run: npm ci
    95 
    96       - name: Install Playwright browsers
    97         run: npx playwright install --with-deps
    98 
    99       - name: Build WordPress
    100         run: npm run build
    101 
    102       - name: Start Docker environment
    103         run: |
    104           npm run env:start
    105 
    106       - name: Log running Docker containers
    107         run: docker ps -a
    108 
    109       - name: Docker debug information
    110         run: |
    111           docker -v
    112           docker-compose -v
    113           docker-compose run --rm mysql mysql --version
    114           docker-compose run --rm php php --version
    115           docker-compose run --rm php php -m
    116           docker-compose run --rm php php -i
    117           docker-compose run --rm php locale -a
    118 
    119       - name: Install WordPress
    120         env:
    121           LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
    122         run: npm run env:install
    123 
    124       - name: Install Gutenberg
    125         run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }}
    126 
    127       - name: Run E2E tests
    128         run: npm run test:e2e
    129 
    130       - name: Archive debug artifacts (screenshots, HTML snapshots)
    131         uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
    132         if: always()
    133         with:
    134             name: failures-artifacts
    135             path: artifacts
    136             if-no-files-found: ignore
    137 
    138       - name: Ensure version-controlled files are not modified or deleted
    139         run: git diff --exit-code
     49    with:
     50      LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
    14051
    14152  slack-notifications:
     
    17283    steps:
    17384      - name: Dispatch workflow run
    174         uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
     85        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    17586        with:
    17687          retries: 2
Note: See TracChangeset for help on using the changeset viewer.