Make WordPress Core


Ignore:
Timestamp:
06/06/2024 04:34:11 PM (6 months ago)
Author:
desrosj
Message:

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

This updates the 5.9 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 5.9 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.

Location:
branches/5.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.9

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

    r55516 r58358  
    4141  cancel-in-progress: true
    4242
     43# Disable permissions for all available scopes by default.
     44# Any needed permissions should be configured at the job level.
     45permissions: {}
     46
    4347jobs:
    4448  # Runs PHP coding standards checks.
    45   #
    46   # Violations are reported inline with annotations.
    47   #
    48   # Performs the following steps:
    49   # - Checks out the repository.
    50   # - Sets up PHP.
    51   # - Logs debug information.
    52   # - Configures caching for PHPCS scans.
    53   # - Installs Composer dependencies (use cache if possible).
    54   # - Make Composer packages available globally.
    55   # - Logs PHP_CodeSniffer debug information.
    56   # - Runs PHPCS on the full codebase with warnings suppressed.
    57   # - Runs PHPCS on the `tests` directory without warnings suppressed.
    58   # - Ensures version-controlled files are not modified or deleted.
    5949  phpcs:
    6050    name: PHP coding standards
    61     runs-on: ubuntu-latest
    62     timeout-minutes: 20
     51    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
     52    permissions:
     53      contents: read
    6354    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    64 
    65     steps:
    66       - name: Checkout repository
    67         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    68 
    69       - name: Set up PHP
    70         uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
    71         with:
    72           php-version: '7.4'
    73           coverage: none
    74           tools: composer, cs2pr
    75 
    76       - name: Log debug information
    77         run: |
    78           php --version
    79           composer --version
    80 
    81       # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    82       # http://man7.org/linux/man-pages/man1/date.1.html
    83       - name: "Get last Monday's date"
    84         id: get-date
    85         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    86 
    87       - name: Cache PHPCS scan cache
    88         uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    89         with:
    90           path: .cache/phpcs.json
    91           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    92 
    93       - name: Install Composer dependencies
    94         uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    95         with:
    96           composer-options: "--no-progress --no-ansi"
    97 
    98       - name: Make Composer packages available globally
    99         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    100 
    101       - name: Log PHPCS debug information
    102         run: phpcs -i
    103 
    104       - name: Run PHPCS on all Core files
    105         run: phpcs -q -n --report=checkstyle | cs2pr
    106 
    107       - name: Check test suite files for warnings
    108         run: phpcs tests -q --report=checkstyle | cs2pr
    109 
    110       - name: Ensure version-controlled files are not modified during the tests
    111         run: git diff --exit-code
     55    with:
     56      php-version: '7.4'
    11257
    11358  # Runs the JavaScript coding standards checks.
    114   #
    115   # JSHint violations are not currently reported inline with annotations.
    116   #
    117   # Performs the following steps:
    118   # - Checks out the repository.
    119   # - Logs debug information about the GitHub Action runner.
    120   # - Installs Node.js.
    121   # - Logs updated debug information.
    122   # _ Installs npm dependencies.
    123   # - Run the WordPress JSHint checks.
    124   # - Ensures version-controlled files are not modified or deleted.
    12559  jshint:
    12660    name: JavaScript coding standards
    127     runs-on: ubuntu-latest
    128     timeout-minutes: 20
     61    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
     62    permissions:
     63      contents: read
    12964    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    130     env:
    131       PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    132 
    133     steps:
    134       - name: Checkout repository
    135         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    136 
    137       - name: Log debug information
    138         run: |
    139           npm --version
    140           node --version
    141           git --version
    142           svn --version
    143 
    144       - name: Install Node.js
    145         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    146         with:
    147           node-version-file: '.nvmrc'
    148           cache: npm
    149 
    150       - name: Log debug information
    151         run: |
    152           npm --version
    153           node --version
    154 
    155       - name: Install Dependencies
    156         run: npm ci
    157 
    158       - name: Run JSHint
    159         run: npm run grunt jshint
    160 
    161       - name: Ensure version-controlled files are not modified or deleted
    162         run: git diff --exit-code
    16365
    16466  slack-notifications:
    16567    name: Slack Notifications
    16668    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     69    permissions:
     70      actions: read
     71      contents: read
    16772    needs: [ phpcs, jshint ]
    16873    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     
    17883    name: Failed workflow tasks
    17984    runs-on: ubuntu-latest
     85    permissions:
     86      actions: write
    18087    needs: [ phpcs, jshint, slack-notifications ]
    18188    if: |
Note: See TracChangeset for help on using the changeset viewer.