Make WordPress Core


Ignore:
Timestamp:
06/04/2024 01:26:19 PM (12 months ago)
Author:
desrosj
Message:

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

This updates the 6.1 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).
  • Removes the performance testing workflow. This workflow was overhauled in 6.4 to use Playwright. Continuing to support Puppeteer-based performance testing in 6.1-6.3 (which was historically very flaky) in a reusable workflow outweighs the benefit.
  • 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.

Merges [56113], [56114], [57918], [58157], [57124], [57125], [57249] to the 6.1 branch.

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

Location:
branches/6.1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.1

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

    r55489 r58330  
    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   # - Configures caching for PHPCS scans.
    52   # - Installs Composer dependencies.
    53   # - Make Composer packages available globally.
    54   # - Runs PHPCS on the full codebase with warnings suppressed.
    55   # - Generate a report for displaying issues as pull request annotations.
    56   # - Runs PHPCS on the `tests` directory without warnings suppressed.
    57   # - Generate a report for displaying `test` directory issues as pull request annotations.
    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: cs2pr
    75 
    76       # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    77       # http://man7.org/linux/man-pages/man1/date.1.html
    78       - name: "Get last Monday's date"
    79         id: get-date
    80         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    81 
    82       - name: Cache PHPCS scan cache
    83         uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    84         with:
    85           path: .cache/phpcs.json
    86           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    87 
    88       # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    89       # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    90       - name: Install Composer dependencies
    91         uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    92         with:
    93           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    94 
    95       - name: Make Composer packages available globally
    96         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    97 
    98       - name: Run PHPCS on all Core files
    99         id: phpcs-core
    100         run: phpcs -n --report-full --report-checkstyle=./.cache/phpcs-report.xml
    101 
    102       - name: Show PHPCS results in PR
    103         if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
    104         run: cs2pr ./.cache/phpcs-report.xml
    105 
    106       - name: Check test suite files for warnings
    107         id: phpcs-tests
    108         run: phpcs tests --report-full --report-checkstyle=./.cache/phpcs-tests-report.xml
    109 
    110       - name: Show test suite scan results in PR
    111         if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
    112         run: cs2pr ./.cache/phpcs-tests-report.xml
    113 
    114       - name: Ensure version-controlled files are not modified during the tests
    115         run: git diff --exit-code
     55    with:
     56      php-version: '7.4'
    11657
    11758  # Runs the JavaScript coding standards checks.
    118   #
    119   # JSHint violations are not currently reported inline with annotations.
    120   #
    121   # Performs the following steps:
    122   # - Checks out the repository.
    123   # - Sets up Node.js.
    124   # - Logs debug information about the GitHub Action runner.
    125   # - Installs npm dependencies.
    126   # - Run the WordPress JSHint checks.
    127   # - Ensures version-controlled files are not modified or deleted.
    12859  jshint:
    12960    name: JavaScript coding standards
    130     runs-on: ubuntu-latest
    131     timeout-minutes: 20
     61    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
     62    permissions:
     63      contents: read
    13264    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    133     env:
    134       PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    135 
    136     steps:
    137       - name: Checkout repository
    138         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    139 
    140       - name: Set up Node.js
    141         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    142         with:
    143           node-version-file: '.nvmrc'
    144           cache: npm
    145 
    146       - name: Log debug information
    147         run: |
    148           npm --version
    149           node --version
    150           git --version
    151           svn --version
    152 
    153       - name: Install npm Dependencies
    154         run: npm ci
    155 
    156       - name: Run JSHint
    157         run: npm run grunt jshint
    158 
    159       - name: Ensure version-controlled files are not modified or deleted
    160         run: git diff --exit-code
    16165
    16266  slack-notifications:
    16367    name: Slack Notifications
    16468    uses: WordPress/wordpress-develop/.github/workflows/slack-notifications.yml@trunk
     69    permissions:
     70      actions: read
     71      contents: read
    16572    needs: [ phpcs, jshint ]
    16673    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
     
    17683    name: Failed workflow tasks
    17784    runs-on: ubuntu-latest
     85    permissions:
     86      actions: write
    17887    needs: [ phpcs, jshint, slack-notifications ]
    17988    if: |
Note: See TracChangeset for help on using the changeset viewer.