Make WordPress Core


Ignore:
Timestamp:
05/31/2024 07:23:44 PM (11 months ago)
Author:
desrosj
Message:

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

This updates the 6.4 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:

  • 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.4 branch.

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

Location:
branches/6.4
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4

  • branches/6.4/.github/workflows/php-compatibility.yml

    r57002 r58276  
    4141
    4242jobs:
    43 
    4443  # Runs PHP compatibility testing.
    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 PHP compatibility scans.
    53   # - Installs Composer dependencies.
    54   # - Make Composer packages available globally.
    55   # - Runs the PHP compatibility tests.
    56   # - Generate a report for displaying issues as pull request annotations.
    57   # - Ensures version-controlled files are not modified or deleted.
    5844  php-compatibility:
    5945    name: Check PHP compatibility
    60     runs-on: ubuntu-latest
     46    uses: WordPress/wordpress-develop/.github/workflows/reusable-php-compatibility.yml@trunk
    6147    permissions:
    6248      contents: read
    63     timeout-minutes: 20
    6449    if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
    65 
    66     steps:
    67       - name: Checkout repository
    68         uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
    69         with:
    70           show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
    71 
    72       - name: Set up PHP
    73         uses: shivammathur/setup-php@4bd44f22a98a19e0950cbad5f31095157cc9621b # v2.25.4
    74         with:
    75           php-version: '7.4'
    76           coverage: none
    77           tools: cs2pr
    78 
    79       - name: Log debug information
    80         run: |
    81           composer --version
    82 
    83       # This date is used to ensure that the PHP compatibility cache is cleared at least once every week.
    84       # http://man7.org/linux/man-pages/man1/date.1.html
    85       - name: "Get last Monday's date"
    86         id: get-date
    87         run: echo "date=$(/bin/date -u --date='last Mon' "+%F")" >> $GITHUB_OUTPUT
    88 
    89       - name: Cache PHP compatibility scan cache
    90         uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
    91         with:
    92           path: .cache/phpcompat.json
    93           key: ${{ runner.os }}-date-${{ steps.get-date.outputs.date }}-phpcompat-cache-${{ hashFiles('**/composer.json', 'phpcompat.xml.dist') }}
    94 
    95       # Since Composer dependencies are installed using `composer update` and no lock file is in version control,
    96       # passing a custom cache suffix ensures that the cache is flushed at least once per week.
    97       - name: Install Composer dependencies
    98         uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # v2.2.0
    99         with:
    100           custom-cache-suffix: ${{ steps.get-date.outputs.date }}
    101 
    102       - name: Make Composer packages available globally
    103         run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
    104 
    105       - name: Run PHP compatibility tests
    106         id: phpcs
    107         run: phpcs --standard=phpcompat.xml.dist --report-full --report-checkstyle=./.cache/phpcs-compat-report.xml
    108 
    109       - name: Show PHPCompatibility results in PR
    110         if: ${{ always() && steps.phpcs.outcome == 'failure' }}
    111         run: cs2pr ./.cache/phpcs-compat-report.xml
    112 
    113       - name: Ensure version-controlled files are not modified or deleted
    114         run: git diff --exit-code
    11550
    11651  slack-notifications:
     
    14883    steps:
    14984      - name: Dispatch workflow run
    150         uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
     85        uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
    15186        with:
    15287          retries: 2
Note: See TracChangeset for help on using the changeset viewer.