Make WordPress Core


Ignore:
Timestamp:
06/28/2024 06:40:36 PM (11 months ago)
Author:
desrosj
Message:

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

This updates the 5.8 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).
  • Cache the results of PHP_CodeSniffer runs (#49783).

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

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

Location:
branches/5.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.8

  • branches/5.8/.github/workflows/javascript-tests.yml

    r55517 r58597  
    3939  cancel-in-progress: true
    4040
     41# Disable permissions for all available scopes by default.
     42# Any needed permissions should be configured at the job level.
     43permissions: {}
     44
    4145jobs:
    42   # 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 Node.js.
    48   # - Logs updated debug information.
    49   # _ Installs npm dependencies.
    50   # - Run the WordPress QUnit tests.
    51   # - Ensures version-controlled files are not modified or deleted.
     46  # Runs the WordPress Core JavaScript tests.
    5247  test-js:
    5348    name: QUnit Tests
    54     runs-on: ubuntu-latest
    55     timeout-minutes: 20
     49    uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk
     50    permissions:
     51      contents: read
    5652    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    57 
    58     steps:
    59       - name: Checkout repository
    60         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    61 
    62       - name: Log debug information
    63         run: |
    64           npm --version
    65           node --version
    66           git --version
    67           svn --version
    68 
    69       - name: Install Node.js
    70         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    71         with:
    72           node-version-file: '.nvmrc'
    73           cache: npm
    74 
    75       - name: Log debug information
    76         run: |
    77           npm --version
    78           node --version
    79 
    80       - name: Install Dependencies
    81         run: npm ci
    82 
    83       - name: Run QUnit tests
    84         run: npm run grunt qunit:compiled
    85 
    86       - name: Ensure version-controlled files are not modified or deleted
    87         run: git diff --exit-code
    8853
    8954  slack-notifications:
    9055    name: Slack Notifications
    9156    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     57    permissions:
     58      actions: read
     59      contents: read
    9260    needs: [ test-js ]
    9361    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    9462    with:
    95       calling_status: ${{ needs.test-js.result == 'success' && 'success' || needs.test-js.result == 'cancelled' && 'cancelled' || 'failure' }}
     63      calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
    9664    secrets:
    9765      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     
    10371    name: Failed workflow tasks
    10472    runs-on: ubuntu-latest
    105     needs: [ test-js, slack-notifications ]
     73    permissions:
     74      actions: write
     75    needs: [ slack-notifications ]
    10676    if: |
    10777      always() &&
     
    11080      github.run_attempt < 2 &&
    11181      (
    112         needs.test-js.result == 'cancelled' || needs.test-js.result == 'failure'
     82        contains( needs.*.result, 'cancelled' ) ||
     83        contains( needs.*.result, 'failure' )
    11384      )
    11485
    11586    steps:
    11687      - name: Dispatch workflow run
    117         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     88        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    11889        with:
    11990          retries: 2
Note: See TracChangeset for help on using the changeset viewer.