Make WordPress Core


Ignore:
Timestamp:
06/06/2024 03:27:31 PM (10 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/coding-standards.yml

    r55490 r58357  
    1010      - '[4-9].[0-9]'
    1111    tags:
    12       - '3.[89]*'
    13       - '[4-9].[0-9]*'
     12      - '[0-9]+.[0-9]'
     13      - '[0-9]+.[0-9].[0-9]+'
     14      - '!3.7.[0-9]+'
    1415  pull_request:
    1516    branches:
     
    4041  cancel-in-progress: true
    4142
     43# Disable permissions for all available scopes by default.
     44# Any needed permissions should be configured at the job level.
     45permissions: {}
     46
    4247jobs:
    4348  # Runs PHP coding standards checks.
    44   #
    45   # Violations are reported inline with annotations.
    46   #
    47   # Performs the following steps:
    48   # - Checks out the repository.
    49   # - Sets up PHP.
    50   # - Configures caching for PHPCS scans.
    51   # - Installs Composer dependencies.
    52   # - Make Composer packages available globally.
    53   # - Runs PHPCS on the full codebase with warnings suppressed.
    54   # - Generate a report for displaying issues as pull request annotations.
    55   # - Runs PHPCS on the `tests` directory without warnings suppressed.
    56   # - Generate a report for displaying `test` directory issues as pull request annotations.
    57   # - Ensures version-controlled files are not modified or deleted.
    5849  phpcs:
    5950    name: PHP coding standards
    60     runs-on: ubuntu-latest
    61     timeout-minutes: 20
     51    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
     52    permissions:
     53      contents: read
    6254    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    63 
    64     steps:
    65       - name: Checkout repository
    66         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    67 
    68       - name: Set up PHP
    69         uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
    70         with:
    71           php-version: '7.4'
    72           coverage: none
    73           tools: cs2pr
    74 
    75       # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    76       # http://man7.org/linux/man-pages/man1/date.1.html
    77       - name: "Get last Monday's date"
    78         id: get-date
    79         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    80 
    81       - name: Cache PHPCS scan cache
    82         uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    83         with:
    84           path: |
    85             .cache/phpcs-src.json
    86             .cache/phpcs-tests.json
    87           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    88 
    89       # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    90       # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    91       - name: Install Composer dependencies
    92         uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    93         with:
    94           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    95 
    96       - name: Make Composer packages available globally
    97         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    98 
    99       - name: Run PHPCS on all Core files
    100         id: phpcs-core
    101         run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
    102 
    103       - name: Show PHPCS results in PR
    104         if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
    105         run: cs2pr ./.cache/phpcs-report.xml
    106 
    107       - name: Check test suite files for warnings
    108         id: phpcs-tests
    109         run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
    110 
    111       - name: Show test suite scan results in PR
    112         if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
    113         run: cs2pr ./.cache/phpcs-tests-report.xml
    114 
    115       - name: Ensure version-controlled files are not modified during the tests
    116         run: git diff --exit-code
     55    with:
     56      php-version: '7.4'
    11757
    11858  # Runs the JavaScript coding standards checks.
    119   #
    120   # JSHint violations are not currently reported inline with annotations.
    121   #
    122   # Performs the following steps:
    123   # - Checks out the repository.
    124   # - Sets up Node.js.
    125   # - Logs debug information about the GitHub Action runner.
    126   # - Installs npm dependencies.
    127   # - Run the WordPress JSHint checks.
    128   # - Ensures version-controlled files are not modified or deleted.
    12959  jshint:
    13060    name: JavaScript coding standards
    131     runs-on: ubuntu-latest
    132     timeout-minutes: 20
     61    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
     62    permissions:
     63      contents: read
    13364    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    134     env:
    135       PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    136 
    137     steps:
    138       - name: Checkout repository
    139         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    140 
    141       - name: Set up Node.js
    142         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    143         with:
    144           node-version-file: '.nvmrc'
    145           cache: npm
    146 
    147       - name: Log debug information
    148         run: |
    149           npm --version
    150           node --version
    151           git --version
    152           svn --version
    153 
    154       - name: Install npm Dependencies
    155         run: npm ci
    156 
    157       - name: Run JSHint
    158         run: npm run grunt jshint
    159 
    160       - name: Ensure version-controlled files are not modified or deleted
    161         run: git diff --exit-code
    16265
    16366  slack-notifications:
    16467    name: Slack Notifications
    16568    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     69    permissions:
     70      actions: read
     71      contents: read
    16672    needs: [ phpcs, jshint ]
    16773    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     
    17783    name: Failed workflow tasks
    17884    runs-on: ubuntu-latest
     85    permissions:
     86      actions: write
    17987    needs: [ phpcs, jshint, slack-notifications ]
    18088    if: |
     
    19098    steps:
    19199      - name: Dispatch workflow run
    192         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     100        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    193101        with:
    194102          retries: 2
Note: See TracChangeset for help on using the changeset viewer.