Make WordPress Core


Ignore:
Timestamp:
06/03/2024 05:00:05 PM (20 months ago)
Author:
desrosj
Message:

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

This updates the 6.3 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.
  • 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 [57918], [58157], [57124], [57125], [57249] to the 6.3 branch.

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

Location:
branches/6.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.3

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

    r55717 r58300  
    4747jobs:
    4848  # Runs PHP coding standards checks.
    49   #
    50   # Violations are reported inline with annotations.
    51   #
    52   # Performs the following steps:
    53   # - Checks out the repository.
    54   # - Sets up PHP.
    55   # - Configures caching for PHPCS scans.
    56   # - Installs Composer dependencies.
    57   # - Make Composer packages available globally.
    58   # - Runs PHPCS on the full codebase with warnings suppressed.
    59   # - Generate a report for displaying issues as pull request annotations.
    60   # - Runs PHPCS on the `tests` directory without warnings suppressed.
    61   # - Generate a report for displaying `test` directory issues as pull request annotations.
    62   # - Ensures version-controlled files are not modified or deleted.
    6349  phpcs:
    6450    name: PHP coding standards
    65     runs-on: ubuntu-latest
     51    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk
    6652    permissions:
    6753      contents: read
    68     timeout-minutes: 20
    6954    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    70 
    71     steps:
    72       - name: Checkout repository
    73         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    74 
    75       - name: Set up PHP
    76         uses: shivammathur/setup-php@d30ad8b1843ace22e6698ab99bbafaa747b6bd0d # v2.24.0
    77         with:
    78           php-version: '7.4'
    79           coverage: none
    80           tools: cs2pr
    81 
    82       # This date is used to ensure that the PHPCS cache is cleared at least once every week.
    83       # http://man7.org/linux/man-pages/man1/date.1.html
    84       - name: "Get last Monday's date"
    85         id: get-date
    86         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    87 
    88       - name: Cache PHPCS scan cache
    89         uses: actions/cache@69d9d449aced6a2ede0bc19182fadc3a0a42d2b0 # v3.2.6
    90         with:
    91           path: |
    92             .cache/phpcs-src.json
    93             .cache/phpcs-tests.json
    94           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcs-cache-${{ hashFiles('**/composer.json', 'phpcs.xml.dist') }}
    95 
    96       # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    97       # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    98       - name: Install Composer dependencies
    99         uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    100         with:
    101           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    102 
    103       - name: Make Composer packages available globally
    104         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    105 
    106       - name: Run PHPCS on all Core files
    107         id: phpcs-core
    108         run: phpcs -n --report-full --cache=./.cache/phpcs-src.json --report-checkstyle=./.cache/phpcs-report.xml
    109 
    110       - name: Show PHPCS results in PR
    111         if: ${{ always() && steps.phpcs-core.outcome == 'failure' }}
    112         run: cs2pr ./.cache/phpcs-report.xml
    113 
    114       - name: Check test suite files for warnings
    115         id: phpcs-tests
    116         run: phpcs tests --report-full --cache=./.cache/phpcs-tests.json --report-checkstyle=./.cache/phpcs-tests-report.xml
    117 
    118       - name: Show test suite scan results in PR
    119         if: ${{ always() && steps.phpcs-tests.outcome == 'failure' }}
    120         run: cs2pr ./.cache/phpcs-tests-report.xml
    121 
    122       - name: Ensure version-controlled files are not modified during the tests
    123         run: git diff --exit-code
     55    with:
     56      php-version: '7.4'
    12457
    12558  # Runs the JavaScript coding standards checks.
    126   #
    127   # JSHint violations are not currently reported inline with annotations.
    128   #
    129   # Performs the following steps:
    130   # - Checks out the repository.
    131   # - Sets up Node.js.
    132   # - Logs debug information about the GitHub Action runner.
    133   # - Installs npm dependencies.
    134   # - Run the WordPress JSHint checks.
    135   # - Ensures version-controlled files are not modified or deleted.
    13659  jshint:
    13760    name: JavaScript coding standards
    138     runs-on: ubuntu-latest
     61    uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk
    13962    permissions:
    14063      contents: read
    141     timeout-minutes: 20
    14264    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    143     env:
    144       PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    145 
    146     steps:
    147       - name: Checkout repository
    148         uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
    149 
    150       - name: Set up Node.js
    151         uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
    152         with:
    153           node-version-file: '.nvmrc'
    154           cache: npm
    155 
    156       - name: Log debug information
    157         run: |
    158           npm --version
    159           node --version
    160           git --version
    161           svn --version
    162 
    163       - name: Install npm Dependencies
    164         run: npm ci
    165 
    166       - name: Run JSHint
    167         run: npm run grunt jshint
    168 
    169       - name: Ensure version-controlled files are not modified or deleted
    170         run: git diff --exit-code
    17165
    17266  slack-notifications:
     
    20498    steps:
    20599      - name: Dispatch workflow run
    206         uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 # v6.4.0
     100        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    207101        with:
    208102          retries: 2
Note: See TracChangeset for help on using the changeset viewer.