Make WordPress Core


Ignore:
Timestamp:
05/17/2024 06:12:02 PM (7 months ago)
Author:
desrosj
Message:

Build/Test Tools: Use new reusable workflows in the 6.5 branch.

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

Props johnbillion, swissspidy, jorbin.
See #61213.

File:
1 edited

Legend:

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

    r57927 r58166  
    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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
    75         with:
    76           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    77 
    78       - name: Set up Node.js
    79         uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
    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           locale -a
    91 
    92       - name: Install npm Dependencies
    93         run: npm ci
    94 
    95       - name: Install Playwright browsers
    96         run: npx playwright install --with-deps
    97 
    98       - name: Build WordPress
    99         run: npm run build
    100 
    101       - name: Start Docker environment
    102         run: |
    103           npm run env:start
    104 
    105       - name: Log running Docker containers
    106         run: docker ps -a
    107 
    108       - name: Docker debug information
    109         run: |
    110           docker -v
    111           docker compose run --rm mysql mysql --version
    112           docker compose run --rm php php --version
    113           docker compose run --rm php php -m
    114           docker compose run --rm php php -i
    115           docker compose run --rm php locale -a
    116 
    117       - name: Install WordPress
    118         env:
    119           LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
    120         run: npm run env:install
    121 
    122       - name: Install Gutenberg
    123         run: npm run env:cli -- plugin install gutenberg --path=/var/www/${{ env.LOCAL_DIR }}
    124 
    125       - name: Run E2E tests
    126         run: npm run test:e2e
    127 
    128       - name: Archive debug artifacts (screenshots, HTML snapshots)
    129         uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
    130         if: always()
    131         with:
    132             name: failures-artifacts${{ matrix.LOCAL_SCRIPT_DEBUG && '-SCRIPT_DEBUG' || '' }}-${{ github.run_id }}
    133             path: artifacts
    134             if-no-files-found: ignore
    135 
    136       - name: Ensure version-controlled files are not modified or deleted
    137         run: git diff --exit-code
     49    with:
     50      LOCAL_SCRIPT_DEBUG: ${{ matrix.LOCAL_SCRIPT_DEBUG }}
    13851
    13952  slack-notifications:
Note: See TracChangeset for help on using the changeset viewer.